Solution to the Asterisk problem – no sound when calling via NAT

I noticed recently that there is no sound when calling from IP-phone to another IP-phone which were both behind the same NAT (router).

Therefore, in the sip.conf configuration for these accounts, you need to specify that they are behind NAT, specifying the parameter:


I want to note that the value of “yes” for nat is already obsolete since version Asterisk 11, so it will be correct as mentioned above.

And also point at no to the directmedia parameter, so that Asterisk does not send packets to the same port from which it was received (which in my case happened, both phones connected to Asterisk from the same IP, with the same ports):


Earlier in older versions of asterisk, instead of directmedia=no, canreinvite=no was used.

To support a NAT connection, specify the qualify parameter:


Also in the “general” section you can manually specify the local network and the external asterisk IP address for connections, for example:


Leave a comment

Leave a Reply