<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.&nbsp;&nbsp;</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.&nbsp; 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: &#43;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 &lt;users-bounces@lists.opensips.org&gt; em nome de Carlos Eduardo &lt;kaduww@gmail.com&gt;<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>&nbsp;</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. &nbsp;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 &#8220;flags&#8221; 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 &#8220;a=direction:active&#8221; 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 &#8220;a=nortpproxy:yes&#8221; 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(&quot;User-Agent: Cisco ATA.*&quot;) {fix_nated_sdp(&quot;3&quot;);};</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">
&lt;<a href="mailto:pimenta@inatel.br" target="_blank">pimenta@inatel.br</a>&gt;</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)&nbsp;is behind a NAT.</p>
<p>So, in its SIP OK message I would like to see the&nbsp;SDP containing a valid IP and media&nbsp;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 &quot;fix&quot; SDP content for such objective?</p>
<p>2 -&nbsp;<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&nbsp;or must I to use something more
 like a stun server?</span></p>
<p><span style="font-size:12pt">3 -&nbsp;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>&nbsp; &nbsp; Media Description, name and address (m): audio 55142 RTP/AVP 8 101 &nbsp;( to fix the port)</div>
<div>&nbsp; &nbsp; Connection Information (c): IN IP4 192.168.100.156 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;( 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.&nbsp;</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="&#43;553534719200" target="_blank">
&#43;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">&nbsp;<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">&nbsp;&#43;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">&nbsp;</font><font face="arial, sans-serif">carlos.e.wagner</font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>