I've installed Asterisk 11 and got this error. I changed sip.conf and still seeing error logs on asterisk debug mode.
Asterisk log
[Apr 16 20:43:05] WARNING[18538]: sip/config_parser.c:812 sip_parse_nat_option: nat=yes is deprecated, use nat=force_rport,comedia instead
[Apr 16 20:43:11] WARNING[18538]: sip/config_parser.c:812 sip_parse_nat_option: nat=yes is deprecated, use nat=force_rport,comedia instead
[Apr 16 20:43:11] WARNING[18538]: sip/config_parser.c:812 sip_parse_nat_option: nat=yes is deprecated, use nat=force_rport,comedia instead
[Apr 16 20:43:11] WARNING[18538]: sip/config_parser.c:812 sip_parse_nat_option: nat=yes is deprecated, use nat=force_rport,comedia instead
[Apr 16 20:43:11] WARNING[18538]: sip/config_parser.c:812 sip_parse_nat_option: nat=yes is deprecated, use nat=force_rport,comedia instead
sip.conf
nat=force_rport
However, I need to use nat=yes option. Is there a way to remove this error message?
nat=yes is working for asterisk version 10 or older. From asterisk 11 , nat=yes is depricated. They said nat=yes and nat=force_rport,comedia are same. But i think both are different.
If we change to nat=force_rport,comedia the behavior seems to be fine, except for outside users behind NAT. Our server is also behind NAT.
When an outside NAT:ed user calls in to the network everything works as expected, but when calling the outside user, or when two outside NAT:ed users call each other, the audio only goes one way without any errors shown in the console. When changing back to nat=yes, everything work again.
By looking in the source code for sip/config_parser.c, it seems like the reason for the difference is that when using sip=yes, the auto_force_rport and auto_comedia are cleared. However, when using force_rport,comedia, the auto equivalents are not cleared away.
nat=yes is deprecated in new Asterisk, so use nat=force_rport,comedia. nat=yes or nat=force_rport,comedia are same.