<div dir="ltr"><div>Hi,<br><br>I have installed Opensips 1.9 on debian 6 using the default config for residential with NAT<br>My topology is:<br><br>UAC ------ ROUTER+FIREWALL --------[ INTERNET ]---- OPENSIPS ----- ASTERISK<br>
UAC is behind NAT 89.xxx.xxx.xxx<br>Opensips and Asterisk has Public IP&#39;s<br><br>I&#39;m facing the following issue:<br>The invite from UAC is announcing his audio port on 4000<br>Because is not NAT detected the asterisk is sending the rtp media directly to 89.x.x.x:4000 and no using rtp_proxy<br>
Because the firewall is blocking the RTP port 4000 coming from Asterisk&#39;s IP there is no audio on the UAC side <br><br>IF I comment the line #if (nat_uac_test(&quot;23&quot;)) all the traffic is going to rtp_proxy and audio is working fine.<br>
Is there any way to solve this ?<br><br>route{<br>        force_rport();<br>        if (nat_uac_test(&quot;23&quot;)) {<br>                if (is_method(&quot;REGISTER&quot;)) {<br>                        fix_nated_register();<br>
                        setbflag(NAT);<br>                } else {<br>                        fix_nated_contact();<br>                        setflag(NAT);<br>                }<br>        }<br>        .....<br><br><br><br>U 89.xxx.xxx.xxx:47054 -&gt; 193.xxx.xxx.xxx:5060<br>
INVITE <a href="http://sip:+0080080000@myopensips.com:5060">sip:+0080080000@myopensips.com:5060</a> SIP/2.0.<br>Via: SIP/2.0/UDP 89.xxx.xxx.xxx:47054;rport;branch=z9hG4bKPjhaz3VKGysNj2NSHtuKad0rIMpg3pUdt9.<br>Max-Forwards: 70.<br>
From: &lt;<a href="mailto:sip%3A50105@myopensips.com">sip:50105@myopensips.com</a>&gt;;tag=szMaKKCRwqx5OGjUCwNS7F4X1ZDQpr8F.<br>To: &lt;<a href="mailto:sip%3A%2B0080080000@myopensips.com">sip:+0080080000@myopensips.com</a>&gt;.<br>
Contact: &lt;sip:50105@89.xxx.xxx.xxx:47054;ob&gt;.<br>Call-ID: sLw5Y3pTNKyBLrk2ZS9brsL87jxN6CPZ.<br>CSeq: 3657 INVITE.<br>Route: &lt;sip:myopensips.com:5060;transport=udp;lr&gt;.<br>Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS.<br>
Supported: replaces, 100rel, timer, norefersub.<br>Session-Expires: 1800.<br>Min-SE: 90.<br>User-Agent: CSipSimple_GT-I9100-16/r1916.<br>Content-Type: application/sdp.<br>Content-Length: 348.<br>.<br>v=0.<br>o=- 3574590691 3574590691 IN IP4 89.xxx.xxx.xxx.<br>
s=pjmedia.<br>c=IN IP4 89.xxx.xxx.xxx.<br>t=0 0.<br>m=audio 4000 RTP/AVP 99 0 8 101.<br>c=IN IP4 89.xxx.xxx.xxx.<br>a=rtcp:4001 IN IP4 89.xxx.xxx.xxx.<br>a=sendrecv.<br>a=rtpmap:99 SILK/24000.<br><br>Regards,<br>Andrei<br>
</div></div>