Call ending after 33 seconds automatically - URGENT

Hi,

We are using a third party telco in India and the call works fine but disconnected automatically after 33seconds. this happens for outbound calls only, inbound calls work though on the same telco phone number.

Can you please help us get to the bottom of this issue?

Attached PCAP for your reference. And a SCL ID (SCL_Z4uDBbFfKr62)

SCL_Z4uDBbFfKr62_R20LBQVBLlGzDdFeqdYyEWzEihD.pcap (127.6 KB)

This seems similar to Inbound calls ending by livekit when there is no activity from user for around 20-30 sec

Let me take a look

@Manav_Kulshrestha

Thanks for sharing the PCAP and SCL ID — they were very helpful in pinpointing the issue.

The call is being terminated by your telco, not by LiveKit. Here’s what’s happening:

Your telco’s SIP server (TCL-MEDIA / Asterisk) is behind NAT and is advertising its private IP address (192.168.0.25) in the SIP Contact header instead of its public IP (159.117.150.40). When LiveKit sends the ACK to confirm the call, it follows the Contact header and sends it to 192.168.0.25 — which is unreachable from the public internet. The ACK never arrives.

Because the telco never receives the ACK, it retransmits the 200 OK repeatedly (11 times over ~32 seconds following RFC 3261 Timer G/H). After 32 seconds with no ACK, it gives up and sends a BYE to tear down the call. This matches your observation of disconnection at ~33 seconds exactly.

Why inbound calls work fine: When the telco calls you, it initiates the connection to LiveKit’s public IP, and the NAT traversal works naturally in that direction. The problem only appears on outbound because LiveKit needs to route the ACK back through the telco’s NAT, and the private Contact address makes that impossible.

To fix this, your telco needs to configure their Asterisk server to advertise the public IP in SIP headers. Depending on their Asterisk version:

  • PJSIP (pjsip.conf): Set external_media_address and external_signaling_address to their public IP (159.117.150.40), and configure local_net with their internal subnet.

  • chan_sip (sip.conf): Set externaddr=159.117.150.40, localnet=192.168.0.0/255.255.255.0, and nat=force_rport,comedia.

This is a common NAT misconfiguration with SIP trunking and is something your telco’s network team should be able to resolve quickly.

I hope that helps

Thanks for the update. Let me get in touch with them. I may get back incase their is some further assistance required. Thanks for the help.