<p></p>

<h3>Description</h3>
<p>Follow-up to previous closed PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="307992894" data-permission-text="Title is private" data-url="https://github.com/kamailio/kamailio/issues/1488" data-hovercard-type="pull_request" data-hovercard-url="/kamailio/kamailio/pull/1488/hovercard" href="https://github.com/kamailio/kamailio/pull/1488">#1488</a></p>
<p>Had a chance to catch a live call involving rfc7335 private IPs.</p>
<p>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>
<h3>Troubleshooting</h3>
<h4>Reproduction</h4>
<p>route[NATMANAGE] {<br>
...<br>
if (nat_uac_test("8"))<br>
fix_nated_sdp("15");<br>
...<br>
}</p>
<h4>Debugging Data</h4>

<pre><code>(paste your debugging data here)
</code></pre>
<h4>Log Messages</h4>

<pre><code>(paste your log messages here)
</code></pre>
<h4>SIP Traffic</h4>

<pre><code>U 2020/04/07 10:36:02.572802 135.19.155.163:17669 -> 65.39.1.1:5060
INVITE sip:8007777777@client.mydomain.net:5060 SIP/2.0
Via: SIP/2.0/UDP 192.0.0.254:11198;branch=z9hG4bK1066155396
From: "ME" sip:2213@client.mydomain.net:5060;tag=3901872054
To: sip:8007777777@client.mydomain.net:5060
Call-ID: 6_327133011@192.168.0.78
CSeq: 1 INVITE
Contact: sip:2213@192.0.0.254:11198
Content-Type: application/sdp
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
Max-Forwards: 70
User-Agent: Yealink SIP-T46S 66.84.0.10
Allow-Events: talk,hold,conference,refer,check-sync
Supported: replaces
Content-Length: 305

v=0
o=- 22668 22668 IN IP4 192.168.0.78
s=SDP data
c=IN IP4 192.0.0.254
t=0 0
m=audio 22936 RTP/AVP 9 0 8 18 101
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

U 2020/04/07 10:36:02.573384 65.39.1.1:5060 -> 135.19.155.163:17669
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.0.0.254:11198;branch=z9hG4bK1066155396;rport=17669;received=135.19.155.163
From: "ME" sip:2213@client.mydomain.net:5060;tag=3901872054
To: sip:8007777777@client.mydomain.net:5060
Call-ID: 6_327133011@192.168.0.78
CSeq: 1 INVITE
Server: NXO
Content-Length: 0

U 2020/04/07 10:36:02.573608 65.39.1.1:5060 -> 66.199.2.2:5060
INVITE sip:8007777777@client.mydomain.net:5060 SIP/2.0
Record-Route: sip:65.39.1.1;lr;did=faf.517
Via: SIP/2.0/UDP 65.39.1.1;branch=z9hG4bK6ef8.b9248afe5375fc379eb33718de1f7481.0
Via: SIP/2.0/UDP 192.0.0.254:11198;rport=17669;received=135.19.155.163;branch=z9hG4bK1066155396
From: "ME" sip:2213@client.mydomain.net:5060;tag=3901872054
To: sip:8007777777@client.mydomain.net:5060
Call-ID: 6_327133011@192.168.0.78
CSeq: 1 INVITE
Contact: sip:2213@192.0.0.254:11198;alias=135.19.155.163~17669~1
Content-Type: application/sdp
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
Max-Forwards: 69
Allow-Events: talk,hold,conference,refer,check-sync
Supported: replaces
Content-Length: 281
..
v=0.
o=- 22668 22668 IN IP4 192.168.0.78
s=SDP data.
c=IN IP4 192.0.0.254
t=0 0
m=audio 22936 RTP/AVP 9 0 18 101
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
</code></pre>
<h3>Possible Solutions</h3>

<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>version: kamailio 5.1.10 (x86_64/linux) cfcfd5
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: cfcfd5
compiled on 21:57:38 Feb 12 2020 with gcc 4.9.2
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>

<pre><code>Debian 8
Linux proxy1 2.6.32-39-pve #1 SMP Fri May 8 11:27:35 CEST 2015 x86_64 GNU/Linux
</code></pre>

<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/issues/2277">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZK5NJRPQA4YGRSFV7LRLNDO3ANCNFSM4MDHDN5A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZIRNXEBWZYBQKZ4YC3RLNDO3A5CNFSM4MDHDN5KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4I4FZCYQ.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/issues/2277",
"url": "https://github.com/kamailio/kamailio/issues/2277",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>