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:- Credentials (Username/Password)
- IP Access Control List
Use when your AI platform has dynamic IPs or you need SIP digest authentication.Endpoint: Response:Save the
POST https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/cURL
credential_uuid for trunk creation.Step 2: Create Outbound Trunk
Endpoint:POST https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/
cURL
trunk_id. To get the trunk’s SIP domain, retrieve the trunk:
cURL
Step 3: Configure Your AI Platform
Use thetrunk_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/
- Without Authentication
- With Authentication
cURL
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
Step 3: Assign Phone Number to Trunk
- Go to Phone Numbers in the Plivo Console
- Select your phone number
- Under Voice Configuration, select SIP Trunk
- Choose your inbound trunk from the dropdown
- Save changes
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:Related
- SIP Trunking Overview - Architecture and concepts
- ElevenLabs Integration - Connect ElevenLabs
- LiveKit Integration - Connect LiveKit
- Retell AI Integration - Connect Retell AI
- Vapi Integration - Connect Vapi
- Hangup Codes - Troubleshooting