Has anyone been successful in integrating Exotel with LiveKit?
from nishad:
Yes we have many customers who use Exotel already. They use the same APIs listed here like creating inbound trunks, adding dispatch rules, etc. It doesn't really need an integration. Did you have any specific questions on how to do that ?
Hello, could you please give us a bit more info on how this is managed? We tried integrating with Exotel and are facing a lot of issues. At a high level if there's a list of steps or if we have to do anything specific w.r.t. Exotel.
Thank you.
I had a call with exotel team. They are asking for FQDN and Port. I provided them my SIP URI without the sip(SIP endpoint) and the port. But they face issue with it.
Next thing we tried to do is to use the wss url with voicebot applet. That doesn't work as well. Stuck in this loop since 2 months.
Please help folks.
@arjun-mavonic Yeah been stuck with the same thing, let me know if you figure this out.
@arjun-mavonic Yeah been stuck with the same thing, let me know if you figure this out.
@akash-dutta-dev yup issue got sorted. It was mistake from exotel team.
Your FQDN is the sip url and the TCP port is 5060
@arjun-mavonic Yeah been stuck with the same thing, let me know if you figure this out.
@akash-dutta-dev yup issue got sorted. It was mistake from exotel team.
Your FQDN is the sip url and the TCP port is 5060
can you let me know are you able to hear the AI Agent when you call on the number?
Have you tried using this guide -> https://support.exotel.com/support/solutions/articles/3000134145-livekit-and-exotel-sip-trunking-integration-guide ?
I have registered a SIP Trunk with them. Destination URI as SIP URI given in the livekit cloud dashboard, Transport as TCP and port as 5060. My agent is self hosted locally on my laptop. Whenever I try to call on the number, I see no job request so that agent is dispatched to some room. While I am testing via Zoiper i can see agent joining the room and continuing the conversation.
have any one figured out the integration? @arjun-mavonic did you?
have any one figured out the integration? @arjun-mavonic did you?
Yup. Our inbound and outbound is completely functional with exotel.
For outbound we use exotel api to place a call.
For call transfer there is an issue, hence we are using pipecat for exotel, because I pipecat supports websocket based agents, u could integrate it with voice bot applet from exotel.
So I am not using livekit for exotel, we use livekit for other providers who have full sip support.
Exotel doesn't support SIp based outbound and call transfer natively yet.
have any one figured out the integration? @arjun-mavonic did you?
Yup. Our inbound and outbound is completely functional with exotel.
For outbound we use exotel api to place a call.
For call transfer there is an issue, hence we are using pipecat for exotel, because I pipecat supports websocket based agents, u could integrate it with voice bot applet from exotel.
So I am not using livekit for exotel, we use livekit for other providers who have full sip support.
Exotel doesn't support SIp based outbound and call transfer natively yet.
Hey @arjun-mavonic thanks again for sharing your experience with Exotel + LiveKit earlier.
I’m trying to get inbound working and I’m stuck where only the Exotel path fails:
LiveKit Cloud telephony, one inbound trunk + dispatch rule.
Same trunk has two numbers:
a US test number (from another provider)
an Exotel DID
Calling the US number works perfectly (room + agent + audio).
Calling the Exotel DID gives a 400 on the Exotel side, and they say it’s probably my backend, but if that were the case the US number shouldn’t work either.
On Exotel, I’m using AppBazaar:
Call Start → Connect → Configure using Flow Builder
In Flow Builder, Dial phone number, where the number is the VN/DID they say is mapped to my LiveKit SIP FQDN (I also tried adding ;transport=tcp).
Since I only care about inbound for now, could you share how you wired this on your side?
Are you using vSIP / trunk alias, or directly dialling a SIP URI from Flow Builder?
In your working flow, does Dial target a phone number, a sip:... URI, or some internal alias Exotel set up?
Have you hit 400 on Exotel → LiveKit before, and what was the cause?
Even a brief example of your working Connect/Dial config would really help me see what I’m doing wrong. Thanks a lot
@arjun-mavonic can you help me with the exotel livekit integration I am new to this domain cant figure out how I can integrate the exotel with livekit, it will be helpful if you can provide some kind of docs for the flow you have setup for your use case
Outbound call ACK sent to Contact URI instead of Record-Route path (Exotel TCP trunk)
When making outbound calls over TCP to Exotel, the 200 OK contains Record-Route headers with TCP transport and a Contact header with transport=tls. LiveKit SIP is sending subsequent requests (ACK) to the Contact URI (TLS) instead of following the Record-Route path (TCP), causing connection refused.
Error: transport
Summarising what's worked for people in this thread and the LiveKit forum, for anyone still stuck:
Inbound
- Give Exotel your India-pinned host as the FQDN:
<subdomain>.india.sip.livekit.cloud, TCP port 5060 (host only, without thesip:prefix). Indian SIP trunks can't send media outside India, so the default (non-India) endpoint can fail. - If calls reach LiveKit but no agent job starts, check that the Exotel DID is on your inbound trunk in exactly the format Exotel sends (+91…) and that a dispatch rule matches it. In one forum case, a 503 went away after removing extra numbers from the trunk.
Outbound
- Ask Exotel whether SIP outbound (vSIP) is enabled on your account. As @arjun-zosma noted, some accounts only support outbound through Exotel's call API. If it is enabled, Exotel must allow-list LiveKit's India egress IPs (confirm the current ranges with LiveKit support), and the outbound trunk needs
destination_country="in".
I keep these steps as a checklist in a small open-source helper: https://github.com/Rehansanjay/livekit-india
@Smshendehub this looks like what #734 fixed (clearing the cached destination so the ACK follows the Record-Route path), released in v1.6.0 on June 26. If you're self-hosting an older livekit/sip image, updating should fix it. LiveKit Cloud should already have it.
Correction to my comment above: Exotel published an official LiveKit guide on Aug 31 that supersedes parts of it: https://docs.exotel.com/exotel-agentstream/connect-exotel-sip-trunk-to-livekit
- Outbound SIP is supported: use digest credentials on the Exotel trunk and the same username/password on the LiveKit outbound trunk. Exotel's IP ACL only takes single /32 IPs, so allow-listing LiveKit's egress ranges isn't the way.
- Inbound destination is
<subdomain>.india.sip.livekit.cloud:5061;transport=tls, and the Connect applet's "Dial whom" should besip:<trunk_sid>.
The livekit-india checklist is updated to match.