Voice AI Ecosystem
Connect Exotel SIP Trunk to ElevenLabs Conversational AI
19 min
this guide explains how to connect exotel sip trunking to elevenlabs conversational ai so you can place and receive pstn calls in india through exotel while your agent runs on elevenlabs github repo (reference) https //github com/exotel/agentstream voiceaiecosystem what you will set up integration direction when to use outbound sip (digest) elevenlabs → exotel → pstn agent places outbound calls via your exotel did inbound sip pstn → exotel did → elevenlabs callers dial your exotel number and reach the agent separate the api work outbound sip uses only create trunk → map did → credentials inbound sip adds destination uri on the trunk (and flow) trunk acl (whitelisted ips) applies only when your voice ai provider gives you a static egress ip — exotel trunk does not support cidr range allowlisting; use one static ip per api call (mask 32) if needed architecture outbound sip (digest) elevenlabs → sip digest → exotel edge ip\ port → indian pstn → customer inbound sip customer → pstn → exotel did → flow (connect) → sip \<trunk sid> → … → sip rtc elevenlabs io → elevenlabs agent destination uri on the trunk defines where exotel sends inbound sip toward elevenlabs in the connect applet dial whom , use sip \<trunk sid> only — the trunk sid string returned from create trunk (not a full sip\ user\@host uri) for fqdn only inbound (no digest on trunk), do not add post /credentials unless exotel requires it for your design prerequisites exotel my in exotel com with sip trunking enabled kyc ; exophone (did) in e 164 (+91…) api key , api token , account sid from api credentials apis https //api in exotel com (india) elevenlabs agents / conversational ai and sip phone import published agent ; api key if testing outbound via http api network sip tcp or tls ; rtp udp per exotel network doc part a — elevenlabs (dashboard) outbound sip (digest) agents → create/publish agent phone numbers → import a phone number from sip trunk e 164 exotel did; transport tcp/tls per exotel; sip digest = same values you will set in exotel post /credentials outbound address = exotel edge ip\ port from exotel import → assign number to agent note agent phone number id for api tests inbound sip (acl path) import number; leave digest empty if using acl on elevenlabs allowlist exotel signaling ips on elevenlabs if required (exotel network doc) part b — exotel console numbers, kyc, app bazaar / flows for connect when using inbound part c — exotel apis auth https //api key\ api token\@api in exotel com/ rate limit 200 requests/minute templates exotel trunk api snippets md outbound sip — required steps only create trunk map did to trunk post /credentials — digest; must match elevenlabs import optional (only if elevenlabs gives a static egress ip) post /whitelisted ips with that single ip , mask 32 repeat per static ip if exotel and your provider agree do not assume cidr range whitelist on trunk curl s x post \\ "https //${api key} ${api token}@${subdomain}/v2/accounts/${account sid}/trunks/${trunk sid}/credentials" \\ h "content type application/json" \\ d '{ "user name" "sip user", "password" "sip pass", "friendly name" "eleven labs" }' applicability ui driven (elevenlabs console for agents + phone numbers) with optional api driven outbound triggering exotel edge exotel provides sip edge ip address(es) and port(s) for signaling (for example tls 443 or tcp 5070 per exotel network and firewall) configure \<exotel edge ip> \<port> in elevenlabs — use the values exotel assigns for your account edge hostnames you may see (india) in voip exotel com 5070 (tcp) and in voip exotel com 443 (tls) use the exact host/ip + port + transport exotel assigns see exotel trunk api snippets md for details acl vs digest (important) avoid trying to whitelist cidr ranges exotel trunk acl is intended for static /32 ips only (mask 32) if a provider publishes only cidr / shared egress ranges, prefer digest and coordinate with exotel/provider support—mixing allowlists and digest can cause auth/routing issues in multi tenant egress setups inbound sip — destination uri on trunk map inbound sip toward elevenlabs (host/port/transport per elevenlabs) curl s x post "https //${api key} ${api token}@${subdomain}/v2/accounts/${account sid}/trunks/${trunk sid}/destination uris" \\ h "content type application/json" \\ d '{ "destinations" \[ { "destination" "sip rtc elevenlabs io 5060;transport=tcp" } ] }' connect applet (inbound) app bazaar → flow → connect applet dial whom sip \<trunk sid> — paste the trunk sid from the create trunk api response (prefix sip only; not a full sip uri) map the exophone to this flow overview exotel voice ai / sip trunking test calls lab validation (outbound) outbound sip has been tested end to end when trunk + did + digest + (optional) static ip acl align a connected call does not guarantee the agent speaks — see below outbound api use elevenlabs conversational ai outbound call api — confirm the current url in elevenlabs api docs (paths change over time) curl s x post "https //api elevenlabs io/v1/convai/\<outbound call endpoint per current docs>" \\ h "xi api key ${elevenlabs api key}" \\ h "content type application/json" \\ d '{ "agent id" "your agent id", "agent phone number id" "your phone number id", "to number" "+91xxxxxxxxxx" }' inbound dial your exotel did; agent should answer via elevenlabs call connects but agent does not speak (no bot audio) this section applies when the call is triggered but the agent does not play audio check action assignment imported did assigned to the agent used in the api ids agent phone number id matches the imported sip number agent published; first message / voice configured logs elevenlabs convai traces for session errors rtp if total silence, check udp/rtp per exotel network doc troubleshooting symptom likely cause sip 401 digest mismatch (exotel /credentials vs elevenlabs) sip 403 inbound elevenlabs acl vs exotel source ips 408 / timeout dns/firewall to elevenlabs fqdn connect does nothing dial whom must be sip \<trunk sid> , not a full uri call triggers, no speech see call connects but agent does not speak (no bot audio) official references resource url exotel sip api https //docs exotel com/dynamic sip trunking/detailed sip trunking api reference exotel + elevenlabs https //docs exotel com/dynamic sip trunking/elevenlabs and exotel sip trunking integration guide for voice ai exotel network https //docs exotel com/dynamic sip trunking/network and firewall configuration elevenlabs sip https //elevenlabs io/docs/agents platform/phone numbers/sip trunking
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.
