Overview
Use this integration when VICIdial owns the customer call and connects Dograh to it through Asterisk. Dograh uses Asterisk ARI for audio and VICIdial APIs for operations that must affect the original customer leg:- Hang up the customer call when the agent ends the conversation
- Transfer the customer to a VICIdial in-group
- Update selected VICIdial lead fields from gathered workflow context
Prerequisites
Before configuring VICIdial, ensure that:- Asterisk ARI is connected to Dograh as described in the Asterisk ARI integration
- VICIdial sends the customer call to the Asterisk dialplan that enters the Dograh Stasis application
- You have VICIdial agent API credentials with permission to hang up and perform in-group transfers
- If workflows will update leads, you also have non-agent API credentials with
permission to call
update_lead
Enable the organization feature
- Open Platform Settings by going to https://app.dograh.com/settings
- Enable External PBX integrations.
Configure VICIdial credentials
- Open Telephony Configurations.
- Create or edit an Asterisk ARI configuration.
- In External PBX, set External PBX Type to VICIdial.
- Configure the agent API:
- Agent API URL: normally ends in
/agc/api.php - Agent API User
- Agent API Password
- Agent API URL: normally ends in
- To update leads, configure the non-agent API:
- Non-Agent API URL: normally ends in
/vicidial/non_agent_api.php - Non-Agent API User
- Non-Agent API Password
- Non-Agent API URL: normally ends in
- Save the configuration.
Pass VICIdial call identity to Asterisk
Dograh needs VICIdial’s call identity to control the original customer leg. Configure VICIdial or the connecting dialplan to preserve these SIP headers on the call that enters the Dograh Stasis application:
Hangup and transfer require the call-control identifier and remote-agent user.
Lead updates additionally require the lead ID. The source in-group header is
only required when a transfer mapping uses the
source fallback.
Configure in-group transfers
In-group mappings select a VICIdial destination from information gathered by the agent during a call.- Open or create a Transfer Call tool.
- Select Context Mapping as the destination source.
- Enter a context path, such as
qualifiedorextracted_variables.qualified. - Add one route for each expected value and its destination in-group ID.
- Optionally configure a fallback in-group. Enter
sourceto return the caller to the original in-group captured from the SIP headers. - Save the tool and attach it to the workflow.
Configure lead field mappings
Lead field mappings copy selected values from gathered context into the VICIdial lead before transfer or hangup.- Open the workflow’s Configurations dialog.
- In External PBX Field Updates, add a mapping.
- Enter the gathered-context path and the destination VICIdial lead field.
- Add any additional mappings and save the workflow configuration.
extracted_variables.customer_state to state. A context
path can address a direct gathered-context value or a nested value. Mappings
whose source value is absent are skipped.
The VICIdial adapter ignores mappings that target the API control parameters
source, user, pass, function, and lead_id. The non-agent API
configuration is required for mappings to be applied. A lead-update failure
does not prevent Dograh from attempting the requested transfer or hangup.
Runtime behavior
When the workflow transfers the call, Dograh resolves the configured in-group, applies available lead updates, asks VICIdial to transfer the customer leg, and then closes only the local Asterisk media leg. When the conversation ends without a transfer, Dograh persists final gathered context, applies available lead updates, asks VICIdial to hang up the customer leg, and then closes the local Asterisk leg.Troubleshooting
- VICIdial settings are not visible: enable External PBX integrations in Platform Settings.
- The local media leg ends but the customer remains connected: confirm that
X-VICIDIAL-calleridandX-VICIDIAL-userreach Asterisk and that the agent API credentials can control the call. - A transfer cannot resolve a destination: inspect the workflow’s final gathered context, the configured context path, and the mapping values.
- The
sourcefallback fails: ensureX-VICIDIAL-ingroup_idis present on the inbound call. - Lead fields are unchanged: confirm
X-VICIDIAL-lead_id, the non-agent API credentials, and the destination field names.