Skip to main content
Connect AI voice agent platforms (ElevenLabs, LiveKit, Vapi) to Plivo’s telephony network via SIP trunking.

Summary


Outbound Calls (AI Agent → Phone)

Route calls from your AI agent platform to phone numbers via PSTN.

Step 1: Create Authentication

Choose one authentication method:
Use when your AI platform has dynamic IPs or you need SIP digest authentication.Endpoint: POST https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/
cURL
Response:
Save the credential_uuid for trunk creation.

Step 2: Create Outbound Trunk

Endpoint: POST https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/
cURL
Response:
The create response returns only the trunk_id. To get the trunk’s SIP domain, retrieve the trunk:
cURL
Response:

Step 3: Configure Your AI Platform

Use the trunk_domain from Step 2 (e.g., 21784177241578.zt.plivo.com) as the SIP address in your AI platform’s configuration. Your platform sends SIP INVITE to this domain to place outbound calls.

Inbound Calls (Phone → AI Agent)

Route incoming phone calls to your AI agent platform.

Step 1: Create Origination URI

Define where Plivo sends inbound calls (your AI platform’s SIP endpoint). Endpoint: POST https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/URI/
cURL
Response:
Save the uri_uuid for trunk creation. Optionally create a second URI for failover.

URI Format Examples

Step 2: Create Inbound Trunk

Endpoint: POST https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/
cURL
Response:

Step 3: Assign Phone Number to Trunk

  1. Go to Phone Numbers in the Plivo Console
  2. Select your phone number
  3. Under Voice Configuration, select SIP Trunk
  4. Choose your inbound trunk from the dropdown
  5. Save changes
Calls to this number now route to your AI agent.

Call Records

To retrieve call detail records (CDRs) and call quality insights for SIP trunk calls, see SIP Trunking API - Calls.

Additional API Operations

For retrieving, listing, updating, and deleting resources: