Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asterisk,SIP Retransmission timeout

Tags:

sip

asterisk

I have created a sip trunk from One Asterisk(version 11.2.1) say 'A' server to another Asterisk server(11.7.0) say 'B', and I am getting sip response 200 ok.
But when I start calling on a DID on Asterisk A then the call is being routed to Asterisk 'B' and After 38 seconds call has been disconnected showing following warnings :

Retransmission timeout reached on transmission [email protected]:5060 for seqno 102 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response
Hanging up call [email protected]:5060 - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).

Any ideas ?

like image 481
Vivek Raj Avatar asked Feb 28 '14 11:02

Vivek Raj


People also ask

How critical are SIP calls in asterisk?

Other SIP requests are only based on request - reply. There's no ACK, no three-way handshake. In Asterisk we mark some of these as CRITICAL - they need to go through for the call to work as expected. Some are non-critical, we don't really care what happens with them, the call will go on happily regardless.

Why does asterisk send a re-invite after a call?

By default Asterisk sends a RE-INVITE request after a call is established. But most sip clients and sip servers in the market do not accept RE-INVITE requests. For this reason, when Asterisk sends a RE-INVITE after a call is established, the other side does not answer the request. So, after 32 seconds, Asterisk hangs up the call.

Why does a SIP client retransmit messages?

In order to make sure that the whole call setup sequence works and that we have a call, a SIP client retransmits messages if there's too much delay between request and expected response. We retransmit a number of times while waiting for the first response. We retransmit the answer to an incoming INVITE while waiting for an ACK.

Why does asterisk hang up after 32 seconds?

So, after 32 seconds, Asterisk hangs up the call. To solve the problem, you need to disable the RE-INVITE feature of Asterisk if your client software does not accept RE-INVITE requests. To do this, you need to edit the sip.conf file in Asterisk to include:


3 Answers

Such situation can be spot when you have nat issues or firewall issue

See this article http://www.voip-info.org/wiki/view/Asterisk+SIP+NAT+solutions

For more info you can enable sip debug by using

 asterisk -r
 sip set debug on
like image 137
arheops Avatar answered Oct 05 '22 07:10

arheops


By default Asterisk sends a RE-INVITE request after a call is established.

But most sip clients and sip servers in the market do not accept RE-INVITE requests. For this reason, when Asterisk sends a RE-INVITE after a call is established, the other side does not answer the request. So, after 32 seconds, Asterisk hangs up the call.

To solve the problem, you need to disable the RE-INVITE feature of Asterisk if your client software does not accept RE-INVITE requests. To do this, you need to edit the sip.conf file in Asterisk to include:

canreinvite = no
like image 28
Iftekhairul Alam Avatar answered Oct 05 '22 07:10

Iftekhairul Alam


These incidents usually associated with NAT problems.

If you're sure that this isn't your problem, take a look at router configuration. Some routers are configured by default with "SIP ALG" option.

In some cases, this option should be off because implementation is incomplete.

Try it, and let me known if it works properly.

like image 22
Sisco Casasempere Avatar answered Oct 05 '22 09:10

Sisco Casasempere