Skip to main content
Flowroute

Advertise your Public IP in your SIP Signaling on Asterisk-based PBXs

This article describes advertising your public IP in your SIP signaling on Asterisk-based PBXs. If your Asterisk-based PBX is behind NAT or is advertising a private IP, such as 192.168.0.2, in your SIP signaling, then you'll need to make the following changes to prevent intermittent one-way audio and other call issues.

NOTE: The following example assumes that your Asterisk PBX uses the IP address 192.168.1.x.

Before you begin

  • You will need two firewall policies for Flowroute's Direct Audio set up on your router to prevent call and audio issues. 

To advertise your public IP:

  1. Go to /etc/asterisk/.
  2. Using a text editor, open sip.conf.
  3. Modify the file with the following: 

    • externip=xxx.xxx.xx.xx 

      where xxx.xxx.xx.xx is your public IP address. This can be found on the router's administration web page or by going to www.whatismyip.com, which will read and display your IP address. 

    • localnet=192.168.1.0/255.255.255.0 

      This must match your local subnet. 

    • nat=yes 

  4. Restart Asterisk. 

    Consult your PBX documentation on how to perform this. Many PBXs can restart Asterisk by running the following commands: 

    service restart asterisk 

    sudo /etc/init.d/asterisk restart 

  5. Verify that the firewall rules were set up
  • Was this article helpful?