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:

nat=force_rport,comedia

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):

directmedia=no

Done.

Did my article help you? How about buying me a cup of coffee as an encouragement? Buy me a coffe.

Leave a comment

Leave a Reply