<div dir="ltr"><br><div>Thank you Bogdan,</div><div><br></div><div>I solved the problem based on your idea.</div><div>I'm not to sure about all because I'm at beginning of use of Opensips.... I am going to read more about it.</div>
<div><br></div><div>best regards,</div><div>Andrei</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 10, 2013 at 7:43 PM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div bgcolor="#ffffff" text="#000000">
<tt>Hello Andrei,<br>
<br>
For such a call (to a public end point), you do not actually need
a media relay as Asterisk could do Comedia (or symmetric RTP).<br>
<br>
The idea is to detect on OpenSIPS the presence of NAT , take care
of fixing the contact of UAC and on SDP part use
fix_nated_sdp("1") (see
<a href="http://www.opensips.org/html/docs/modules/1.9.x/nathelper.html#id250434" target="_blank">http://www.opensips.org/html/docs/modules/1.9.x/nathelper.html#id250434</a>)
for force Comedia on Asterisk. No need for a media relay.<br>
<br>
Best regards,<br>
</tt>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre><div><div class="h5">
<br>
On 04/10/2013 06:42 PM, Andrei Grav wrote:
</div></div><blockquote type="cite"><div><div class="h5">
<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's<br>
<br>
I'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's IP there is no audio on the UAC side <br>
<br>
IF I comment the line #if (nat_uac_test("23")) 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("23")) {<br>
if (is_method("REGISTER")) {<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 -> 193.xxx.xxx.xxx:5060<br>
INVITE <a href="http://sip:+0080080000@myopensips.com:5060" target="_blank">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: <<a href="mailto:sip%3A50105@myopensips.com" target="_blank">sip:50105@myopensips.com</a>>;tag=szMaKKCRwqx5OGjUCwNS7F4X1ZDQpr8F.<br>
To: <<a href="mailto:sip%3A%2B0080080000@myopensips.com" target="_blank">sip:+0080080000@myopensips.com</a>>.<br>
Contact: <a><sip:50105@89.xxx.xxx.xxx:47054;ob></a>.<br>
Call-ID: sLw5Y3pTNKyBLrk2ZS9brsL87jxN6CPZ.<br>
CSeq: 3657 INVITE.<br>
Route: <a><sip:myopensips.com:5060;transport=udp;lr></a>.<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>
</div></div><pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</div>
</blockquote></div><br></div>