How it works
Call flowDograh
- Phone CallPlivoAudio StreamWebSocketWebSocket serverDograhVoice agent
Prerequisites
Outbound call setup
For outbound calls, Dograh dials out with a caller ID from the Plivo configuration. No Plivo console changes are required.Get the Plivo credentials
Sign in to the Plivo console and copy the Auth ID and Auth Token from the dashboard.
Add a Plivo configuration in Dograh
- API
- Console
Send the Plivo credentials to Dograh, authenticated with a Dograh API key.The The response returns the configuration’s ID. Use it as the
application_id should be unset and Dograh creates a Plivo Application automatically.config.auth_id,config.auth_token— the Plivo Auth ID and Auth Token.is_default_outbound: true— makes this the default configuration for outbound calls.
config_id when adding the default caller ID in the next step.Add the default caller ID
Add a phone number to the saved configuration in E.164 format, for example
+14150000001. This is the From number (the caller ID) for outbound calls.- API
- Console
Add the number to the configuration and mark it as the default caller ID, authenticated with a Dograh API key.Use the
config_id returned when the configuration is created, or shown on the saved configuration in Dograh.address— the phone number in E.164 format.is_default_caller_id: true— makes it the default caller ID for outbound calls.
This number is not linked to a specific agent. Any agent can use this number as its caller ID when the call is started in Dograh.
Place an outbound call
Trigger a Dograh agent to call a destination number. The call dials from the default caller ID set above.
- API
- Console
Dograh dials the destination number and runs the agent on the call, authenticated with a Dograh API key.
workflow_uuid— in the URL path, the agent that places the call.phone_number— the destination number in E.164 format.telephony_configuration_id— optional, routes the call through a specific configuration instead of the default.
On a self-hosted deployment, Dograh must be reachable at a public URL so Plivo can fetch the Answer URL and open the call’s media WebSocket. See Self-hosted setup for how to set this up.
Inbound call setup
For inbound calls, an external caller dials the Plivo number. The number must route to the Plivo Application that holds Dograh’s Answer URL, and it needs an inbound workflow that decides which agent answers.Get the Plivo credentials
Sign in to the Plivo console and copy the Auth ID and Auth Token from the dashboard.
Add a Plivo configuration in Dograh
- API
- Console
Send the Plivo credentials to create the configuration and add the inbound number, authenticated with a Dograh API key.The
application_id should be unset and Dograh creates a Plivo Application with the Answer URL already set.Refer to Create a telephony configuration and Add a phone number for all parameters.Link the number to the Plivo Application
Dograh creates the Plivo Application but does not attach numbers to it. The inbound number should be manually linked to the Plivo application.
- API
- Console
Update the Plivo number to point at the Dograh Application, authenticated with the Auth ID and Auth Token over Basic auth.
app_id— the Application ID from the Dograh saved configuration.
Assign an inbound workflow
Each inbound number needs an inbound workflow, which is the agent that answers calls to the number.
- API
- Console
Update the phone number in Dograh to set its inbound workflow, authenticated with a Dograh API key.
inbound_workflow_id— the workflow that answers calls to the number.clear_inbound_workflow: true— removes the workflow later. On its own,inbound_workflow_id: nullis treated as no change.
A single Plivo configuration can hold multiple phone numbers, each with its own Inbound workflow.
Self-hosted setup
The Plivo integration works the same on Dograh Cloud and on a self-hosted instance. The only difference is that Plivo has to reach the self-hosted instance directly, so it needs a public HTTPS address. Dograh handles this automatically. Its self-hosting guide starts the whole stack with a single Docker command, and this command brings up a Cloudflare tunnel that exposes the instance at a public HTTPS URL. This default tunnel needs no Cloudflare account or token but the tunnel’s subdomain changes each time it restarts. Dograh uses the URL as the base of the Answer URL that Plivo fetches, for examplehttps://<random>.trycloudflare.com/api/v1/telephony/inbound/run.
For a stable hostname, run a named Cloudflare tunnel. This requires a Cloudflare account, and the same guide walks through the setup.
Once Dograh is reachable at its public URL, the outbound and inbound setup is identical to Dograh Cloud.
Troubleshooting
Related
Plivo Audio Streaming
How Plivo streams call audio over a WebSocket.
Dograh
The open-source Dograh voice AI platform.
Dograh Plivo docs
Dograh’s own Plivo configuration reference.