Asterisk behind a NAT?
VoIP PBXs, Datacenters, Cabling Installation, KNX
VoIP PBXs, Datacenters, Cabling Installation, KNX
15811
post-template-default,single,single-post,postid-15811,single-format-standard,bridge-core-3.1.4,qode-page-transition-enabled,ajax_fade,page_not_loaded,,qode-theme-ver-30.3,qode-theme-bridge,qode_header_in_grid,wpb-js-composer js-comp-ver-7.5,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 =your_host.no-ip.info (This is your private host from a service such as no-ip.com. If you use externhost, remove the above line externip).
localnet=192.168.1.0/255.255.255.0

localnet=192.168.2.0/255.255.255.0

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.

nat=yes
externrefresh=15

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.