I am running 13.6 from Gerritt and pjsip 2.4.5 behind NAT with a dynamic IP address. Asterisk / pjsip seems to insist on putting my private IP into the contact header. Doesn’t seem to cause a problem but I don’t like the idea of exposing it. Note that I am running enable=yes in dnsmgr.conf. I am familiar with the externaddr command but can’t use it because of the dynamic IP address. Is there a way to make Asterisk track and use the public IP?
edited I set up stun in rtp.conf and res_stun_monitor.conf.
pjsip now shows
stun show status
Hostname Port Period Retries Status ExternAddr ExternPort
stun.callwithus.com 3478 300 3 OK 75.23.nnn.nnn 35486
ExternAddr looks correct but when I run pjsip show transport my_transport
both External_Signaling_Addr and External_Media_Address are blank and the Contact header still lists the Lan address. This was reported in 2014 but there were no responses. Similar to post https://community.asterisk.org/t/asterisk-13-with-pjsip-behind-nat/