How to connect Asterisk SIP Clients over Duel Layers of NAT
A common problem with SIP is it’s difficulty handling NAT(especially over multiple layers). A common symptom is no audio stream. The Asterisk CLI shows a successful call connection succeeding followed by an error in /var/log/asterisk/messages:
Packet timed out after 6399ms with no response
The SIP phone is registered in this case and configured for NAT. The phone can is registered and can dial calls on the Asterisk server, but no audio. As you can see above the call setup is being directed to setup the audio stream to the remote phones internal address.
This can easily be remedied by setting the following global /etc/asterisk/sip.conf options:
localnet=192.168.1.0/255.255.255.0
Reload Asterisk for the changes to take effect. If you still are having an issue double check the port forwarding rules. Asterisk SIP clients need at minimum ports 5060 UDP/TCP for SIP and (10,000-20,000 UDP) for RTP(audio stream). Good Luck!
No Comments »
RSS feed for comments on this post. TrackBack URL