asterisk - retrans_pkt: Retransmission timeout reached on transmission

    Solution for the asterisk sip trunk issue -"Retransmission timeout reached on transmission". you may notice the following error or warning in the asterisk cli while dialing out , even though the SIP trunk in reachable the call will fail. In this article we will see the cause and solution to solve the retransmission timeout issue.

"WARNING[4738]: chan_sip.c:4151 retrans_pkt: Retransmission timeout reached on transmission 5ffb66e8293beewe185e524c6a1006c2@192.168.1.12:5060 for seqno 102 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions

Packet timed out after 31999ms with no response "

asterisk retransmission timeout

what causes the Retransmission timeout:

    The SIP protocol is based on requests and replies. Both sides send requests and wait for replies. . Firewalls, NAT devices, Session Border Controllers and SIP Proxys are in the signaling path and they will affect the call.

By default Asterisk sends a RE-INVITE request after a call is established, if the response is not received the asterisk through the warning as stated initially in this article.

For some reason signaling doesn't work as expected between your Asterisk server and the other device. There could be many reasons why this happens.

  1. Asterisk sip settings not configured with required parameters.
  2. SIP ALG configuration in intermediate Firewall devices.
  3. A NAT device in the signaling path. A misconfigured NAT device is in the signaling path and stops SIP messages.
  4. A firewall that blocks messages or reroutes them wrongly in an attempt to assist in a too clever way.
  5. A SIP middlebox (SBC) that rewrites contact: headers so that we can't reach the other side with our reply or the ACK.
  6. A badly configured SIP proxy that forgets to add record-route headers to make sure that signaling works.

Solutions for asterisk Retransmission timeout

 Following are the possible solutions to resolve the asterisk retransmission timeout issue facing is asterisk based dialers like vicidial goautodial and freepbx.

Asterisk SIP settings

  Make sure necessary parameters are configured in the sip settings of asterisk sip.conf file.

Below are listed parameters to resolve the asterisk retransmission timeout issue.

if your asterisk server is behind a firewall configured with local LAN IP ,then add the below entries

nat=force_rport,comedia

externip=your public ip

Also add the below parameters in your sip trunk settings.

insecure=port,invite or  insecure=very

canreinvite=no

port: ignore the port number where the request came from

invite: don’t require authentication of incoming INVITEs

port,invite: don’t require initial INVITE to authenticate and ignore the port where the request came from

insecure=very ; To allow registered hosts to call without re-authenticating

Firewall SIP ALG:

    Disable the SIP ALG in the firewall, if the Firewall is placed in between the Asterisk and the provider. SIP ALG (Application Layer Gateway) and SPI (Stateful Packet Inspection) need to be disabled on most routers and firewalls, if equipped. This is usually found on  theSecurity/Firewall tab in the device’s web interface.

    Checkout my article on Enabling/Disabling SIP ALG in various Firewalls/Routers

SIP Ports:

    Make sure the necessary TCP and UDP ports are opened in your Firewall, ISP, Routers . The Default ports used by SIP Protocol are 

5060 - UDP also supports TCP

5060 to 5080 are usable ports for SIP or Custom ports can be defined in sip.conf

10000 to 20000 - RTP Ports used for media transmission  UDP

conclusion:

    Hope the article is helpful to resolve the asterisk retransmission timeout issue which you are facing while dialing out, for professional support reach me on skype or telegram -id:striker24x7

No Comment
Add Comment
comment url