<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi Carlos.</p>
<p><br>
</p>
<p>That is what I'm looking for and now trying to understand if it is sufficient for may case.</p>
<p>With this function I will be able to fix IP. But I still have to fix Ports. </p>
<p><br>
</p>
<p>If there are NATs, so I suppose there is some kind of Ports mapping that has to be taken into account when solving the NAT traversal. I and a coworker are investigating how to solve the port mapping. Maybe the solution will demand ICE and STUN. We can't
use media proxy module, because our hardware will not be able to do media relay. So, We can have a media relay in the same place as OpenSIPs.<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>Thanks a lot.<br>
</p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div class="BodyFragment"><font size="2">
<div class="PlainText">RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br>
Ph: +55 35 3471 9200 RAMAL 979<br>
</div>
</font></div>
</div>
</div>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>De:</b> users-bounces@lists.opensips.org <users-bounces@lists.opensips.org> em nome de Carlos Eduardo <kaduww@gmail.com><br>
<b>Enviado:</b> quinta-feira, 31 de março de 2016 11:43<br>
<b>Para:</b> OpenSIPS users mailling list<br>
<b>Assunto:</b> Re: [OpenSIPS-Users] What is the module to fix SDP ?</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hello Rodrigo,
<div><br>
</div>
<div>Maybe the function fix_nated_sdp, from nathelper module, would help.</div>
<div><br>
</div>
<div>
<div>1.5.2. fix_nated_sdp(flags [, ip_address])</div>
<div><br>
</div>
<div>Alters the SDP information in orer to facilitate NAT traversal. What changes to be performed may be controled via the “flags” paramter.</div>
<div><br>
</div>
<div>Meaning of the parameters is as follows:</div>
<div><br>
</div>
<div>flags - the value may be a bitwise OR of the following flags:</div>
<div>0x01 - adds “a=direction:active” SDP line;<br>
</div>
<div>0x02 - rewrite media IP address (c=) with source address of the message or the provided IP address (the provide IP address take precedence over the source address).<br>
</div>
<div>0x04 - adds “a=nortpproxy:yes” SDP line;<br>
</div>
<div>0x08 - rewrite IP from origin description (o=) with source address of the message or the provided IP address (the provide IP address take precedence over the source address).<br>
</div>
<div><br>
</div>
<div>ip_address - IP to be used for rewriting SDP. If not specified, the received signalling IP will be used. The parameter allows pseudo-variables usage. NOTE: For the IP to be used, you need to use 0x02 or 0x08 flags, otherwise it will have no effect.</div>
<div><br>
</div>
<div>This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE.</div>
</div>
<div><br>
</div>
<div>Example:</div>
<div>
<div>if (search("User-Agent: Cisco ATA.*") {fix_nated_sdp("3");};</div>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-03-30 14:57 GMT-03:00 Rodrigo Pimenta Carvalho <span dir="ltr">
<<a href="mailto:pimenta@inatel.br" target="_blank">pimenta@inatel.br</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi.</p>
<p><br>
</p>
<p>I have a case when a peer answering a call (INVITE) is behind a NAT.</p>
<p>So, in its SIP OK message I would like to see the SDP containing a valid IP and media Port valid to receive audio from the caller. That is, the caller need to know a valid IP and Port where he/she can send his/her audio packets.</p>
<p><br>
</p>
<p>1 - Is it possible to "fix" SDP content for such objective?</p>
<p>2 - <span style="font-family:Calibri,Arial,Helvetica,sans-serif,'Apple Color Emoji','Segoe UI Emoji',NotoColorEmoji,'Segoe UI Symbol','Android Emoji',EmojiSymbols; font-size:16px">Can OpenSIPS do something for this idea works or must I to use something more
like a stun server?</span></p>
<p><span style="font-size:12pt">3 - What is the OpenSIPS module that can help me with this task?</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">I guess I will have to fix 2 fiels in SDP:</span></p>
<p><span style="font-size:12pt"></span></p>
<div> Media Description, name and address (m): audio 55142 RTP/AVP 8 101 ( to fix the port)</div>
<div> Connection Information (c): IN IP4 192.168.100.156 ( to fix the IP)</div>
<br>
<p></p>
<p><span style="font-size:12pt">P.S.: I have already a solution (opensips.cfg) that let SIP messages cross NATs without problems. Only SDP has to be fixed. </span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">Any hint will be very helpful!</span></p>
<p><span style="font-size:12pt">Best regards.</span></p>
<span class="HOEnZb"><font color="#888888">
<p><br>
</p>
<p><br>
</p>
<div>
<div name="divtagdefaultwrapper">
<div><font size="2">
<div>RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br>
Ph: <a href="tel:%2B55%2035%203471%209200" value="+553534719200" target="_blank">
+55 35 3471 9200</a> RAMAL 979<br>
</div>
</font></div>
</div>
</div>
</font></span></div>
</div>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div><b>Carlos E. Wagner</b></div>
<div style="font-family:arial; font-size:small"><font style="font-family:arial,sans-serif; font-size:13px"><font style="font-size:x-small; color:rgb(0,0,0)"><i>Tecnólogo em Telecomunicações, OCP, dCAA</i></font><br>
<font size="1"><i></i></font><br>
</font><b><font color="#444444" face="arial, sans-serif">Gnotel Tecnologia</font></b></div>
<div style="font-family:arial; font-size:small"><b><font color="#000000" face="arial, sans-serif">E-mail:</font></b><font face="arial, sans-serif"> <u><a href="mailto:kaduww@gmail.com" target="_blank">kaduww@gmail.com</a></u></font><br>
<font style="font-family:arial,sans-serif; font-size:13px" color="#000000"><b>Fone:</b></font><font face="arial, sans-serif"> +55 48 9981-0894</font><br>
<font style="font-family:arial,sans-serif; font-size:13px" color="#000000"><b>Skype:</b></font><font face="arial, sans-serif"> </font><font face="arial, sans-serif">carlos.e.wagner</font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>