Call from SIP Trunk Disconnects in about 30s

Hello, I’m aware that this is a frequently asked question and happens for Asterisk instance behind a NAT. I am also aware of the page Configuring res_pjsip to work through NAT but I wasn’t able to figure out the correct settings.

Issue, any calls to and from the SIP are being disconnect in about 30 seconds. I believe this is due to call setup (Invite, 200OK, Ack) not happening correctly.

PJSIP Settings,

type = wizard
sends_auth = yes
sends_registration = yes
remote_hosts =
outbound_auth/username = +918046******
outbound_auth/password = hunter2
endpoint/context = from-external
endpoint/allow = !all,ulaw
endpoint/from_user = +918046******
endpoint/from_domain =

Here’s the SIP logs from Asterisk,

In the logs above, I guess there is something wrong with the ACK request sent by the SIP. Can someone please help me in debugging this?

PJSIP does not support the use of tel URIs. Packets of such will be ignored, or responded to with a 416. The ACK contains a tel URI, and thus is ignored.

1 Like

Thanks for the insight! I read other topics that discuss this here and here along with your posts also discussing the blockers.

I did find PJSIP documentation on tel: URI at a few places [0] [1] (the last ticket is 12 years ago :eyes: )

At this point, I guess my best bet is to try out sip.conf instead. Please let me know if you have any other ideas, I do not think I will be able to convince my ISP to not use tel: URI

Is there a way I can disable call setup ACKs?

No, because that’s a fundamental part of the SIP protocol.

Quick update, I switched to a few days ago and haven’t faced issues since then even though the ACK packet is still the same and contains a tel URI.

The difference is that code for tel: URIs has been enable in chan_sip, but it has not been tested thoroughly, so may present a denial of service risk. In chan_pjsip, the code has been more carefully security vetted, and tel: will not be incorporated until someone provides an extensive test suite to prove that edge cases don’t cause a crash. It’s therefore not officially supported in either version.

1 Like

Even for chan_sip it’s iffy, it can spit out warning and errors at you and may or may not work.

You should check session-timer parameter.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.