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.
Prerequisites
Before starting, you’ll need:- Plivo number - Rent here
- Don’t have a Plivo account? - Request Trial
- ElevenLabs AI agent
- ElevenLabs account with Conversational AI access - Create account
Part 1: Receive incoming calls
Set up an ElevenLabs agent to receive calls when someone dials your Plivo phone numberCreate an inbound trunk in Plivo
An inbound trunk tells Plivo where to send incoming calls.- On your Plivo console, navigate to SIP Trunking → Inbound Trunks .
- Click Create New Inbound Trunk and configure:
- Add a URI by clicking Add New URI
- 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.- Navigate to ElevenLabs Dashboard → Agents Platform → Telephony → Phone numbers -> Import number -> From SIP Trunk
- Enter a Label for the number
- Enter the number (e.g +918076543210)
- Configure which agent should handle calls from this number
- 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.
- 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
- Navigate to SIP Trunking → Outbound Trunks .
- Click Create New Outbound Trunk.
- Add credentials by clicking Add New Credentials List:
None
- Configure trunk settings:
None
- Click Create Trunk and copy the Termination SIP Domain:
None
Configure ElevenLabs for outbound calls
Use the credentials from Plivo to set up ElevenLabs:- On ElevenLabs, navigate to Import number -> From SIP Trunk
- 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. POSTCURL
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.
- 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