No Sound On external SIP Asterisk

If like myself, you’ve spent Months, trying to find out why a perfectly installed FreePBX/Asterisk system just will not work with an external SIP extension, then I really feel for you!

Asterisk is great “When It Works” , but when it doesn’t, You probably end up with many headaches and increased stress levels.

Well today – FINALLY -
I’ve fixed the issue with no sound on external sip calls and am going to reveal just how I did it.

No sound with SIP | No Sound With Asterisk| No Sound With NAT

To correctly troubleshoot your issue, make sure that the following steps are taken.

  1. On you router, open up the following ports and forward them to your asterisk box. Your asterisk box may be in the form of (FreePBX, AsteriskNOW or TrixBox) – They all use the same formatPorts to open for External SIP with NAT

Once these ports have been forwarded to the IP of your Asterisk server, give your router a reboot. Re-Login to your router just to reconfirm that the posts are infact pointing to the correct IP of the Asterisk Server.

The next step is to ensure that you configure your NAT settings on the Asterisk server correctly.
The following image shows how best to set up your settings.

If you’re behind a router with a Static IP but your internal network (including Asterisk) is on a 192.168.x.x network, these settings apply to you. If not, simply change these to work with your network setup.

Asterisk NAT Settings

Another important tip for troubleshooting your sound issue is to make sure that you enable the codecs that you will be using. If you’re using a softphone for example, make sure it supports calling with your enabled codecs. If not – Make sure y otou enable them in Asterisk. If they’re not listed, try a different softphone but generally, you should be okay.

All the other configuration options are not external to Asterisk. This is where I went worng. I tried tweaking and changing asterisk settings for months to no avail.   SAVE YOUR TIME

If you have No Audio – It’s to do with your ROUTER or FIREWALL.
If you’ve configured the ports as I’ve shown above, there are only a few things left to check.

1. Internal firewall. If you’re using a softphone on a machine, make sure the firewall is disabled for testing. If it works, you need to open up the same ports on the machine as you did in the router.

2. Router. Many of today’s commercial routers implement SIP ALG (Application-level gateway), coming with this feature enabled by default. While ALG could help in solving NAT related problems, the fact is that many routers’ ALG implementations are wrong and break SIP.

THIS WAS WHAT WAS WRONG WITH MY SETUP
Everything on my router was in fact correct. I had never heard of ALG before, mainly because there was no mention of it on my routers administrator panel anywhere. After doing a google search for <my router model SIP no sound” I came across a small post relating to ALG.
Even though ALG was not mentioned in my router page, it’s still there and active, just not visible on the front end.

I had to telnet into my router and login and then issue a command to turn ALG off.

List of routers with SIP ALG enabled

The following is a list containing SIP ALG router models, their issues and how to disable SIP ALG (enabled by default in most of the cases). Please add more data to this list if you have experimented problems due to a SIP ALG router.

SpeedTouch

Models: ST530 v6 (firmware >= 5.4.0.13) comes with SIP ALG enabled by default.
NAT type: symmetrical
Issues:

  • No incoming calls.
  • It replaces the private IP appearing in SIP headers with the public IP using a dumb text replacement. If for example the private IP appears in the “Call-ID” it replaces it too (that it’s completely unnecessary).

To disable SIP ALG:

~# telnet router
-> connection unbind application=SIP port=5060
-> saveall

Zyxel

Models: 660 family comes with SIP ALG enabed by default.
NAT type: symmetrical

Issues:

  • No incoming calls.
  • SIP protocol broken making 50% of outgoing calls impossible because the wrong values are inserted into SIP headers.

To disable SIP ALG:

~# telnet router
Menu option “24. System Maintenance”.
Menu option “8. Command Interpreter Mode”.
ip nat service sip active 0

Netgear

Models: WGR614v9 Wireless-G Router, DGN2000 Wireless-N ADSL2+ Modem Router
Firmware V1.0.18_8.0.9NA
To disable SIP ALG: From Wan Setup Menu, NAT Filtering, uncheck the box next to “Disable SIP ALG”

SMC

Models: ToDo
NAT type: No symmetrical
Issues:

  • The ALG doesn’t replace the private address in “Call-ID” header (that is correct) but it does replace the “call-id” value in “Refer-To” header so SIP transfer is broken.

To disable SIP ALG: ToDo no ALG related options found via web and telnet. No idea of how to dissable it.

Linksys

Models: WRV200, WRT610N
NAT type: Symmetrical
Issues:

  • The ALG replaces the private address in “Call-ID” header (not needed at all). Some phones (as Linksys with latest firmware) encode the “Call-ID” value in the “Refer-To” header (by escaping the dots) so the private IP appearing there is not replaced with the public IP. This causes that the call transfer fails since the proxy/PBX/endpoint will not recognize the dialog info.

To disable SIP ALG: ToDo no ALG related options found via web and telnet. No idea of how to disable it.
To disable SIP ALG on WRT610N: Web Interface: Administration, Management, under side heading ‘Advanced Features’ SIP ALG, can be disabled.

Fortinet

Models: 800 comes with SIP ALG enabed by default.
To disable SIP ALG:

~# telnet firewall
config system settings
set sip-helper disable
set sip-nat-trace disable
endconfig system session-helperdelete 12
end
I hope this guide has been helpful and it is rightly indexed by Google.
Please let me know if this fixes your own issue or if you find a solution, again, please let me know as it really will help a lot of people.
Lets call it ” Save the Asterisk Headache Campaign”
{vmproducts id=|3,4,5| description=|yes|}Need A New Phone Line? – BT Landline Installation{/vmproducts}

2 thoughts on “No Sound On external SIP Asterisk

Leave a Reply