<p></p>
<p>It's been a while, stumbled on this case just now. It seems like either nat_uac_test() or more likely fix_nated_sdp() doesn't catch the 192.0.0.0/29 subnet as private.</p>
<p><strong>Script logic:</strong><br>
route[NATMANAGE] {<br>
...<br>
if (nat_uac_test("8"))<br>
fix_nated_sdp("15");<br>
...<br>
}</p>
<p><strong>Sipdump:</strong><br>
U 2020/04/07 10:36:02.572802 135.19.155.163:17669 -> 65.39.1.1:5060<br>
INVITE sip:<a href="mailto:8007777777@client.mydomain.net">8007777777@client.mydomain.net</a>:5060 SIP/2.0<br>
Via: SIP/2.0/UDP 192.0.0.254:11198;branch=z9hG4bK1066155396<br>
From: "ME" sip:2213@client.mydomain.net:5060;tag=3901872054<br>
To: sip:8007777777@client.mydomain.net:5060<br>
Call-ID: 6_327133011@192.168.0.78<br>
CSeq: 1 INVITE<br>
Contact: sip:2213@192.0.0.254:11198<br>
Content-Type: application/sdp<br>
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE<br>
Max-Forwards: 70<br>
User-Agent: Yealink SIP-T46S 66.84.0.10<br>
Allow-Events: talk,hold,conference,refer,check-sync<br>
Supported: replaces<br>
Content-Length: 305</p>
<p>v=0<br>
o=- 22668 22668 IN IP4 192.168.0.78<br>
s=SDP data<br>
c=IN IP4 192.0.0.254<br>
t=0 0<br>
m=audio 22936 RTP/AVP 9 0 8 18 101<br>
a=rtpmap:9 G722/8000<br>
a=rtpmap:0 PCMU/8000<br>
a=rtpmap:8 PCMA/8000<br>
a=rtpmap:18 G729/8000<br>
a=fmtp:18 annexb=no<br>
a=ptime:20<br>
a=sendrecv<br>
a=rtpmap:101 telephone-event/8000<br>
a=fmtp:101 0-15</p>
<p>U 2020/04/07 10:36:02.573384 65.39.1.1:5060 -> 135.19.155.163:17669<br>
SIP/2.0 100 Trying<br>
Via: SIP/2.0/UDP 192.0.0.254:11198;branch=z9hG4bK1066155396;rport=17669;received=135.19.155.163<br>
From: "ME" sip:2213@client.mydomain.net:5060;tag=3901872054<br>
To: sip:8007777777@client.mydomain.net:5060<br>
Call-ID: 6_327133011@192.168.0.78<br>
CSeq: 1 INVITE<br>
Server: NXO<br>
Content-Length: 0</p>
<p>U 2020/04/07 10:36:02.573608 65.39.1.1:5060 -> 66.199.2.2:5060<br>
INVITE sip:<a href="mailto:8007777777@client.mydomain.net">8007777777@client.mydomain.net</a>:5060 SIP/2.0<br>
Record-Route: sip:65.39.1.1;lr;did=faf.517<br>
Via: SIP/2.0/UDP 65.39.1.1;branch=z9hG4bK6ef8.b9248afe5375fc379eb33718de1f7481.0<br>
Via: SIP/2.0/UDP 192.0.0.254:11198;rport=17669;received=135.19.155.163;branch=z9hG4bK1066155396<br>
From: "ME" sip:2213@client.mydomain.net:5060;tag=3901872054<br>
To: sip:8007777777@client.mydomain.net:5060<br>
Call-ID: 6_327133011@192.168.0.78<br>
CSeq: 1 INVITE<br>
Contact: sip:2213@192.0.0.254:11198;alias=135.19.155.163~17669~1<br>
Content-Type: application/sdp<br>
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE<br>
Max-Forwards: 69<br>
Allow-Events: talk,hold,conference,refer,check-sync<br>
Supported: replaces<br>
Content-Length: 281<br>
.<br>
v=0.<br>
o=- 22668 22668 IN IP4 192.168.0.78<br>
s=SDP data.<br>
c=IN IP4 192.0.0.254<br>
t=0 0<br>
m=audio 22936 RTP/AVP 9 0 18 101<br>
a=rtpmap:9 G722/8000<br>
a=rtpmap:0 PCMU/8000<br>
a=rtpmap:18 G729/8000<br>
a=fmtp:18 annexb=no<br>
a=ptime:20<br>
a=sendrecv<br>
a=rtpmap:101 telephone-event/8000<br>
a=fmtp:101 0-15</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/1488#issuecomment-610438437">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZOSDB3KOAOLQDPUY2LRLM53HANCNFSM4EXCIGQA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZNKFZQKSMX2HHUC6NLRLM53HA5CNFSM4EXCIGQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOERRI2JI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/1488#issuecomment-610438437",
"url": "https://github.com/kamailio/kamailio/pull/1488#issuecomment-610438437",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>