I lied.
In a dev environment using master branch, `c=` IP address is now fixed with `nat_addr_mode=1`
Also tested with `nat_addr_mode=0` and it does NOT change it, as expected.
Looks good to me!
kamailio -V version: kamailio 5.4.0-dev4 (x86_64/linux) c68d78
Was able to test only in a 200 OK reply: ``` U 2020/04/16 20:40:45.214751 135.19.1.1:19748 -> 65.39.1.1:5060 SIP/2.0 200 OK Via: SIP/2.0/UDP 65.39.1.1;branch=z9hG4bK852b.2ac5eb86a9cb2654d292b458b696d7f8.0 Via: SIP/2.0/UDP 65.39.2.2:5060;rport=5060;branch=z9hG4bK3c0a4a1c Record-Route: sip:65.39.1.1;lr;did=a83.2a9 From: sip:18007777777@client.mydomain.net;tag=as57291cce To: sip:227@135.19.1.1:19748;tag=224264919 Call-ID: 5788a5ee63e6e659248655176e70aad3@client.mydomain.net CSeq: 102 INVITE Contact: sip:227@192.0.0.254:11172 Content-Type: application/sdp Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE User-Agent: Yealink SIP-T40G 76.84.0.10 Allow-Events: talk,hold,conference,refer,check-sync Supported: timer Content-Length: 320
v=0 o=- 20356 20356 IN IP4 192.168.0.84 s=SDP data c=IN IP4 192.0.0.254 t=0 0 m=audio 10447 RTP/AVP 107 101 a=rtpmap:107 opus/48000/2 a=fmtp:107 sprop-maxcapturerate=16000; maxaveragebitrate=20000; maxplaybackrate=48000; useinbandfec=1 a=ptime:20 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv
U 2020/04/16 20:40:45.221758 65.39.1.1:5060 -> 65.39.2.2:5060 SIP/2.0 200 OK Via: SIP/2.0/UDP 65.39.2.2:5060;rport=5060;branch=z9hG4bK3c0a4a1c Record-Route: sip:65.39.1.1;lr;did=a83.2a9 From: sip:18007777777@client.mydomain.net;tag=as57291cce To: sip:227@135.19.1.1:19748;tag=224264919 Call-ID: 5788a5ee63e6e659248655176e70aad3@client.mydomain.net CSeq: 102 INVITE Contact: sip:227@192.0.0.254:11172;alias=135.19.1.1~19748~1 Content-Type: application/sdp Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE Allow-Events: talk,hold,conference,refer,check-sync Supported: timer Content-Length: 416
v=0 o=- 20356 20356 IN IP4 135.19.1.1 s=SDP data c=IN IP4 135.19.1.1 t=0 0 m=audio 10447 RTP/AVP 107 101 a=rtpmap:107 opus/48000/2 a=fmtp:107 sprop-maxcapturerate=16000; maxaveragebitrate=20000; maxplaybackrate=48000; useinbandfec=1 a=ptime:20 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv a=direction:active a=nortpproxy:yes a=oldmediaip:192.0.0.254 a=oldmediaip:192.168.0.84 ```