Skip to main content

What you’ll build

  • Inbound calling: Configure a Plivo phone number to route incoming calls to ElevenLabs AI agents.
  • Outbound calling: Enable outbound calls from ElevenLabs through Plivo to phone numbers.
This guide covers both scenarios. Implement based on your requirements.

Prerequisites

Before starting, you’ll need: Regional deployment If you’re handling calls to or from India (whether using Plivo India phone numbers or calling Indian numbers), you must have an Indian server with ElevenLabs. Contact ElevenLabs sales team for the same. This is a regulatory requirement - calls will fail if your ElevenLabs server isn’t in India with an error: “Domestic Anchored Terms not met”.

Part 1: Receive incoming calls

Set up an ElevenLabs agent to receive calls when someone dials your Plivo phone number

Create an inbound trunk in Plivo

An inbound trunk tells Plivo where to send incoming calls. Trunk Name: ElevenLabs-Inbound
  • Add a URI by clicking Add New URI
Name: ElevenLabs-Primary SIP URI: sip.rtc.elevenlabs.io:5060;transport=tcp OR sip:sip.rtc.elevenlabs.io:5061;transport=tls For India domestic routing, use: sip.rtc.in.residency.elevenlabs.io.
  • Click Create Trunk.

Connect your phone number

Route your Plivo phone number to the trunk you just created.
  • Navigate to Your Numbers .
  • Click on your phone number to configure it.
  • Update these settings:
    • Application Type: Select Zentrunk.
    • Trunk: Select ElevenLabs-Inbound.
  • Click Update Number.

Import the Plivo number to ElevenLabs to accept calls

ElevenLabs needs to know how to handle incoming calls.
  1. Navigate to ElevenLabs Dashboard → Agents Platform → Telephony → Phone numbers -> Import number -> From SIP Trunk
  2. Enter a Label for the number
  3. Enter the number (e.g +918076543210)
  4. Configure which agent should handle calls from this number
  5. Set up any additional call routing or handling rules

Test incoming calls

Call your Plivo number from any phone. You should:
  • Hear the call connect.
  • Have the call routed to ElevenLabs.
  • Hear your AI agent respond.
  • Have two-way audio working.
If issues occur:
  • For inbound calls: Check Plivo logs first.
  • Then check: ElevenLabs logs in your dashboard.

Part 2: Make outgoing calls

Enable outbound calling from ElevenLabs through Plivo. You will need to use a Plivo number as the caller ID - this is the number that appears on the recipient’s phone.

Create an outbound trunk in Plivo

None
Name: ElevenLabs-Auth
Username: elevenlabs_trunk
Password: [generate strong password]
  • Configure trunk settings:
None
Trunk Name: ElevenLabs-Outbound
Secure Trunking: Enabled (recommended)
  • Click Create Trunk and copy the Termination SIP Domain:
None
Example: [XXXXXXXXXXXX.zt.plivo.com](http://XXXXXXXXXXXX.zt.plivo.com/)
Example: XXXXXXXXXXXX.zt.plivo.com

Configure ElevenLabs for outbound calls

Use the credentials from Plivo to set up ElevenLabs:
  1. On ElevenLabs, navigate to Import number -> From SIP Trunk
  2. Under Outbound Configuration, enter your Plivo details:
    • SIP Domain: Use your Termination SIP Domain from above
    • Username: The username you created
    • Password: The password you created

Make your first call

Use ElevenLabs’ interface or API to initiate an outbound call through your Plivo trunk. The call will use your Plivo number as the caller ID. POST
CURL
curl -X POST https://api.elevenlabs.io/v1/convai/sip-trunk/outbound-call \
-H "xi-api-key: xi-api-key" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "string",
"agent_phone_number_id": "string",
"to_number": "string"
}'

Troubleshooting

Common issues

Call doesn’t connect
  • Verify your SIP URI format includes: transport=tcp.
  • Check that the phone number is mapped to the correct trunk.
  • For inbound: Check Plivo logs first.
  • For outbound: Check ElevenLabs logs first.
Authentication errors
  • Verify username and password match exactly in both Plivo and ElevenLabs
  • Check that credentials are associated with the correct trunk
  • Ensure Termination SIP Domain is correct

Error codes reference

View Plivo’s hangup codes for detailed explanations of errors.

Get Help