ATKEN Techniki | Asterisk behind a NAT?
VoIP PBXs, Datacenters, Cabling Installation, KNX
VoIP PBXs, Datacenters, Cabling Installation, KNX
post-template-default,single,single-post,postid-15811,single-format-standard,theme-bridge,woocommerce-no-js,ajax_fade,page_not_loaded,,columns-4,qode-theme-ver-10.0,wpb-js-composer js-comp-ver-,vc_responsive

Asterisk behind a NAT?

Asterisk behind a NAT?

The NAT configuration can be found in /etc/asterisk/sip_general_custom.conf (on elastix, at least) and not in sip.conf as stated in other forums. Do not edit sip.conf.
The example below assumes that your Asterisk PBX has an IP address of 192.168.1.X:

externip=XXX.XXX.XXX.XXX (This is your static public IP. Instead of externip you could also use the externhost below).
externhost (This is your private host from a service such as If you use externhost, remove the above line externip).


Common problems occur, especially for voice, if you are connecting through a VPN. To resolve all your issues, add both the remote and local networks.


Save your file and restart asterisk (sudo /etc/init.d/asterisk restart).

In addition, you should ensure that you have configured port forwarding correctly on your router. The below ports should be opened and forwarded to your pbx:

5060 – 5061 UDP for SIP.

10000 – 20000 UDP – SIP for RTP Media (This should resolve the issue you have with one way communication).

Good luck!

No Comments

Sorry, the comment form is closed at this time.