I am currently using Asterisk 15.3 and am trying to overwrite the Contact IP Address being used by Asterisk in its ‘200 OK’ response to an INVITE. I am trying to get Asterisk to use the Private IP Address of the Server it is on, but it is always using the Public IP Address, I have local_net set to the Private IP Address, and have played with rewrite_contact, and external_signaling_address, but nothing I have done so far is letting me set the Contact to the Private IP Address. I have a another Server that uses Asterisk 14.6 and I can get it to use the Private IP Address for the Contact. Note: the pjsip.conf files of these two Servers are comparable.
Clarifying, If using the exact same pjsip.conf, extentions.conf, and rtp.conf files; Asterisk 15.3 puts the Public IP-Address of the Asterisk Server into the Contact Header but Asterisk 14.6 puts the Private IP-Address of the Asterisk Server into the Contact Header for a “200 OK” from an “INVITE” Request. tcpdump captures show no other differences when other to pertinent data (The only difference is the version of Asterisk).