I have a problem with send INVITE to SIP terminals behind NAT. My PBX (asterisk Asterisk 11.23.1) incorreclty send OPTIONS Message to private address (NAT address behind may SIP resides) besides public IP, that cause it never answer.
Asterisk set my SIP terminal as an UNREACHABLE. Registering process going well. But OPTIONS no.
Can You help me?
Which SIP channel driver are you using?
I assume these devices are set to host=dynamic. Please confirm and preferably give the configuration file settings, minimally obfuscated for sensitive data?
At the moment, I would assume that the devices are registering with an incorrect Contact address. Please provide SIP debugging information showing the incoming REGISTER and the outgoing OPTIONS.
Please identify the devices, as someone may be familiar with then and know how to configure STUN servers and/or public addresses on them.
I have fixed this issue adding the localnet parameter , but this is not exactly a general fix make sure you have the correct setings for NAT support, Also defining an stun server on the SIP client help to fix NAT issues, these are some important settings when dealing with NAT
externaddr = 126.96.36.199 ; replace thise address by your public IP localnet=192.168.0.0/255.255.0.0 ; RFC 1918 addresses localnet=10.0.0.0/255.0.0.0 ; Also RFC1918 localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation localnet=169.254.0.0/255.255.0.0 ; Zero conf local network
verify the sip sample file to to review all the options avaiable related to NAT
I resolved probelm. I added to sip.conf section nat=comedia,force_rport