Error sip with nat

I have two devices connected from an external network. When they connect after 32 seconds, the call is dropped and I get this error in the console. If I drop the call before 32 seconds, the packet does not reach. The ports are forwarded.
SIP.conf

[general]
context=internal
allowguest=no
allowoverlap=no
rtpstart=10000
rtpend=20000
allowtransfer=yes
externip=111.111.111.111
nat=force_rport,comedia
tlsbindaddr=0.0.0.0:5060
srvlookup=no
disallow=all
allow=ulaw
method = TLSV1_2
alwaysauthreject=yes
canreinvite=no
session-timers=refuse
localnet=192.168.0.0/255.255.255.0
tlsenable=yes
tlscertfile=file.pem
transport=tls
media_encryption = sdes
ice_support = yes

[0000]
type=friend
host=dynamic
encryption=yes
secret=0001
[0001]
type=friend
host=dynamic
encryption=yes
secret=0000

error

Retransmission timeout reached on transmission 11bc71e029119e5877806ed40fcde691@111.xxx.xxx.xxx:5060 for seqno 6939 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response
Hanging up call 11bc71e029119e5877806ed40fcde691@111.xxx.xxx.xx:5060 - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).

Generally caused by the wrong externip or local net setting.

However chan_sip no longer exists in the development version of Asterisk, due for release next month, and people are forgetting how to support it, as the knowledgeable users have already switched to chan_pjsip.

Externip and local net are correct. In LAN everything works fine, problem only with external network. Sound are good, connection too, problem only with this critical packet

The critical packet is the 200 OK saying the call was answered. The caller should respond with ACK. The normal reason for their not responding is that you have sent the wrong address in the Contact header, and they have sent it to that wrong address. That address is set from externip, if the destination isn’t listed in local networks. This is the first packet that actually makes use of the externip when you use force_rport.

When opening ports I have prescribed a route. The response to the invitation request comes, but after that no other requests (e.g. hangup) come through

If rport is set in the request, the response to the INVITE is sent to source IP address and UDP port of the request. Subsequent requests are sent to the address in the Contact headers from the initial exchange

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