Connect ElevenLabs to Vobiz SIP trunking via API - programmatic setup for ultra-realistic AI voice agents on outbound and inbound calls in 130+ countries.
This guide shows how to integrate ElevenLabs with Vobiz programmatically to enable outbound calling and automate voice calls with ultra-realistic AI voices.
💡 Tip: Prefer watching a walkthrough or using the dashboard? See the ElevenLabs integration overview for the video tutorial, or the dashboard setup guide for a visual step-by-step walkthrough.
Perfect for:
textCall flow: Your App → ElevenLabs API → Vobiz SIP → Phone Network → Person Answers → AI Agent Speaks
Vobiz account with SIP trunk → Create account
ElevenLabs account with API key → Sign up
ElevenLabs API key → Get API key
Phone number from Vobiz (for caller ID)
Create a SIP trunk in Vobiz to handle voice traffic.
See: Vobiz SIP trunks documentation
Save these values from the response:
sip_domain (for example, abc123def.sip.vobiz.ai)usernamepasswordYou'll need them for ElevenLabs configuration.
Purchase a phone number for outbound caller ID.
See: Vobiz phone numbers documentation
Via dashboard:
textsk_your_elevenlabs_api_key_here
Save this key securely - you'll use it in all API requests.
bashcurl "https://api.elevenlabs.io/v1/voices" \ -H "xi-api-key: sk_your_elevenlabs_api_key_here"
What to extract:
voice_id - use this when creating your agentname - voice name for identificationcategory - voice type (premade, cloned, etc.)json{ "voices": [ { "voice_id": "voice_id_here", "name": "Rachel", "category": "premade", "labels": { "accent": "american", "age": "young" } }, { "voice_id": "another_voice_id", "name": "Domi", "category": "premade" } ] }
Copy a voice_id - you'll need it in Step 3.
bashcurl -X POST "https://api.elevenlabs.io/v1/convai/agents" \ -H "Content-Type: application/json" \ -H "xi-api-key: sk_your_elevenlabs_api_key_here" \ -d '{ "name": "Customer Support Bot", "conversation_config": { "agent": { "prompt": { "prompt": "You are a helpful customer support assistant. Be friendly, professional, and concise." }, "first_message": "Hello! Thank you for calling. How can I help you today?", "language": "en" }, "tts": { "voice_id": "voice_id_here" } } }'
Replace:
voice_id_here → your chosen voice ID from Step 2json{ "agent_id": "agent_your_agent_id_here", "name": "Customer Support Bot", "conversation_config": { "agent": { "first_message": "Hello! Thank you for calling. How can I help you today?", "language": "en" } } }
Save the agent_id - you'll need it to make calls.
Register your Vobiz phone number with ElevenLabs for outbound calling.
bashcurl -X POST "https://api.elevenlabs.io/v1/convai/phone-numbers" \ -H "Content-Type: application/json" \ -H "xi-api-key: sk_your_elevenlabs_api_key_here" \ -d '{ "provider": "sip_trunk", "phone_number": "+911234567890", "label": "Vobiz Main Line", "inbound_trunk_config": {}, "outbound_trunk_config": { "address": "abc123def.sip.vobiz.ai", "transport": "tcp", "credentials": { "username": "your_username", "password": "your_password" } }, "supports_inbound": true, "supports_outbound": true }'
Replace:
+911234567890 → your Vobiz phone numberabc123def.sip.vobiz.ai → your Vobiz SIP domainyour_username → your Vobiz usernameyour_password → your Vobiz passwordjson{ "phone_number_id": "phnum_your_phone_number_id_here", "phone_number": "+911234567890", "label": "Vobiz Main Line", "supports_outbound": true, "supports_inbound": true, "provider": "sip_trunk" }
Save the phone_number_id - you'll need it in Step 2.
Get Vobiz credentials:
bashcurl -X POST "https://api.elevenlabs.io/v1/convai/sip-trunk/outbound-call" \ -H "Content-Type: application/json" \ -H "xi-api-key: sk_your_elevenlabs_api_key_here" \ -d '{ "agent_id": "agent_your_agent_id_here", "agent_phone_number_id": "phnum_your_phone_number_id_here", "to_number": "+919988776655" }'
Replace:
agent_your_agent_id_here → your agent ID from Part 2, Step 3phnum_your_phone_number_id_here → your phone number ID from Step 1+919988776655 → destination number to calljson{ "success": true, "message": "Outbound call initiated", "conversation_id": "conv_your_conversation_id_here", "sip_call_id": "SCL_your_sip_call_id" }
Call initiated.
What happens next:
bashcurl "https://api.elevenlabs.io/v1/convai/agents" \ -H "xi-api-key: sk_your_elevenlabs_api_key_here"
json[ { "agent_id": "agent_your_agent_id_here", "name": "Customer Support Bot", "conversation_config": { "agent": { "first_message": "Hello! How can I help you today?", "language": "en" } } } ]
View your call history in ElevenLabs Dashboard → Call History.
Test call flow:
Problem: ElevenLabs API key is invalid or expired.
Fix:
sk_).Problem: Agent ID or phone number ID doesn't exist.
Fix:
Problem: The Vobiz trunk cannot reach ElevenLabs SIP servers.
Fix:
tcp.active.Problem: Vobiz account has no credits.
Fix:
Problem: Agent configuration issue or voice not set.
Fix:
first_message configured.voice_id in conversation_config.Problem: Wrong phone number format or trunk configuration.
Fix:
+919988776655 (with + and country code).| Credential | Where to get | Example |
|---|---|---|
| ElevenLabs API Key | ElevenLabs Developer → API Keys | sk_your_elevenlabs_api_key_here |
| Voice ID | Part 2, step 2 (List Voices) | voice_id_here |
| Agent ID | Part 2, step 3 (Create Agent) | agent_your_agent_id_here |
| Phone Number ID | Part 3, step 1 (Import Phone) | phnum_your_phone_number_id_here |
| Vobiz SIP Domain | Vobiz Console → Trunks | abc123def.sip.vobiz.ai |
| Vobiz Username | Vobiz Console → Trunks | your_username |
| Vobiz Password | Vobiz Console → Trunks | your_password |
Base URL: https://api.elevenlabs.io - all requests require xi-api-key: YOUR_ELEVENLABS_API_KEY
| Action | Method | Endpoint |
|---|---|---|
| List voices | GET | /v1/voices |
| Create agent | POST | /v1/convai/agents |
| List agents | GET | /v1/convai/agents |
| Import phone number | POST | /v1/convai/phone-numbers |
| Make outbound call | POST | /v1/convai/sip-trunk/outbound-call |
| Error | Cause | Fix |
|---|---|---|
| 401 Unauthorized | Wrong API key | Regenerate at ElevenLabs Developer |
| 404 Not Found | Wrong agent or phone ID | List agents to verify IDs |
| 408 SIP timeout | Trunk config wrong | Check Vobiz Console → Trunks |
| Insufficient balance | Low Vobiz credits | Add funds in Vobiz Console |
Here's a complete working example with real values:
bash# 1. List voices curl "https://api.elevenlabs.io/v1/voices" \ -H "xi-api-key: sk_your_elevenlabs_api_key_here" # Save a voice_id from the response # 2. Create the agent curl -X POST "https://api.elevenlabs.io/v1/convai/agents" \ -H "Content-Type: application/json" \ -H "xi-api-key: sk_your_elevenlabs_api_key_here" \ -d '{ "name": "Customer Support Bot", "conversation_config": { "agent": { "prompt": { "prompt": "You are a helpful customer support assistant." }, "first_message": "Hello! How can I help you today?", "language": "en" }, "tts": { "voice_id": "voice_id_here" } } }' # Response: save agent_id # 3. Import the phone number curl -X POST "https://api.elevenlabs.io/v1/convai/phone-numbers" \ -H "Content-Type: application/json" \ -H "xi-api-key: sk_your_elevenlabs_api_key_here" \ -d '{ "provider": "sip_trunk", "phone_number": "+911234567890", "label": "Vobiz Main Line", "inbound_trunk_config": {}, "outbound_trunk_config": { "address": "abc123def.sip.vobiz.ai", "transport": "tcp", "credentials": { "username": "your_username", "password": "your_password" } }, "supports_inbound": true, "supports_outbound": true }' # Response: save phone_number_id # 4. Make a call curl -X POST "https://api.elevenlabs.io/v1/convai/sip-trunk/outbound-call" \ -H "Content-Type: application/json" \ -H "xi-api-key: sk_your_elevenlabs_api_key_here" \ -d '{ "agent_id": "agent_your_agent_id_here", "agent_phone_number_id": "phnum_your_phone_number_id_here", "to_number": "+919988776655" }' # Response: call initiated
Vobiz documentation:
ElevenLabs documentation:
Connect 3CX PBX to Vobiz SIP trunking for inbound and outbound calling across 130+ countries - configure a generic SIP trunk in minutes.
Connect an Agora Conversational AI agent to Vobiz SIP trunking - add a Vobiz number to Agora for outbound campaigns and route inbound calls to your agent, including India and 130+ countries.
Bolna ships Vobiz as a built-in telephony provider. Paste two credentials into the Providers screen and your agents place and answer calls on numbers in 130+ countries, reaching 190, with audio streaming rather than a SIP trunk.
We use cookies to run this site and, with your permission, to understand how it's used. Read our Cookie Policy.