<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body 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 class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.9.x/nathelper.html#id250434">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 class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<br>
On 04/10/2013 06:42 PM, Andrei Grav wrote:
<blockquote
cite="mid:CALUe069tLoQzwgXixxMq4742jdKmC7mW1U=0p_nd99FkXgoMZA@mail.gmail.com"
type="cite">
<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 moz-do-not-send="true"
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: <<a moz-do-not-send="true"
href="mailto:sip%3A50105@myopensips.com">sip:50105@myopensips.com</a>>;tag=szMaKKCRwqx5OGjUCwNS7F4X1ZDQpr8F.<br>
To: <<a moz-do-not-send="true"
href="mailto:sip%3A%2B0080080000@myopensips.com">sip:+0080080000@myopensips.com</a>>.<br>
Contact: <a class="moz-txt-link-rfc2396E" href="sip:50105@89.xxx.xxx.xxx:47054;ob"><sip:50105@89.xxx.xxx.xxx:47054;ob></a>.<br>
Call-ID: sLw5Y3pTNKyBLrk2ZS9brsL87jxN6CPZ.<br>
CSeq: 3657 INVITE.<br>
Route: <a class="moz-txt-link-rfc2396E" href="sip:myopensips.com:5060;transport=udp;lr"><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>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>