<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<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>Thank you very much!</p>
<p><br>
</p>
<p>It worked!</p>
<p><br>
</p>
<p>One observation: the documentation for OpenSIPS dev 2.2, says:</p>
<p><br>
</p>
<p>&quot;...It is necessary to include the port...&quot;</p>
<p><br>
</p>
<p>However, when I do <tt>alias=&quot;xxx.xxx.xxx.xxx:5060&quot; it fails.</tt></p>
<p><tt><br>
</tt></p>
<p><tt>Now, my next step will be to analyze the SDP and fix it when OpenSIPS and callee is behind the NAT. Do you have any suggestion for that?</tt></p>
<p><tt><br>
</tt></p>
<p><tt>Best regards.</tt></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" face="Calibri, sans-serif" color="#000000"><b>De:</b> Bogdan-Andrei Iancu &lt;bogdan@opensips.org&gt;<br>
<b>Enviado:</b> quinta-feira, 14 de janeiro de 2016 07:45<br>
<b>Para:</b> OpenSIPS users mailling list; Rodrigo Pimenta Carvalho<br>
<b>Assunto:</b> Re: [OpenSIPS-Users] Config Advertised_address makes OpenSIPS forward SIP ACK when it must not. How to fix? Help.</font>
<div>&nbsp;</div>
</div>
<div><tt>Hi Rodrigo,<br>
<br>
Try adding in your script:<br>
<br>
alias=&quot;xxx.xxx.xxx.xxx&quot;<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a id="LPlnk876033" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div style="margin-bottom: 20px; overflow: auto; width: 100%;" id="LPBorder_GT_14527744755370.8055240616332772">
<table style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);" id="LPContainer_14527744755320.6494078467668469" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td colspan="1" style="width: 250px; position: relative; display: table-cell; padding-right: 20px;" id="ImageCell_14527744755330.9527857780185389">
<div style="background-color: rgb(255, 255, 255); height: 0px; position: relative; margin: auto; display: table; width: 0px;" id="LPImageContainer_14527744755330.23820696236957217">
<a target="_blank" href="http://www.opensips-solutions.com/" style="display: table-cell; text-align: center;" id="LPImageAnchor_14527744755340.47323739784780705"><img aria-label="Imagem de visualização com link selecionado. Toque duas vezes para abrir o link." style="display: inline-block; margin-left: auto; margin-right: auto; max-width: 250px; max-height: 250px; height: 38px; width: 116px; border-width: 0px; vertical-align: bottom;" height="38" width="116" src="http://www.opensips-solutions.com/imgs/opensips-solutions-logo.gif"></a></div>
</td>
<td colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;" id="TextCell_14527744755350.28707470556301407">
<div id="LPRemovePreviewContainer_14527744755350.7433676044014531"></div>
<div style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-size: 21px; font-family: &quot;wf_segoe-ui_light&quot;,&quot;Segoe UI Light&quot;,&quot;Segoe WP Light&quot;,&quot;Segoe UI&quot;,&quot;Segoe WP&quot;,Tahoma,Arial,sans-serif; line-height: 21px;" id="LPTitle_14527744755350.1320023821811258">
<a target="_blank" href="http://www.opensips-solutions.com/" style="text-decoration: none;" id="LPUrlAnchor_14527744755350.9594672760750573">Home — OpenSIPS Solutions</a></div>
<div style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: &quot;wf_segoe-ui_normal&quot;,&quot;Segoe UI&quot;,&quot;Segoe WP&quot;,Tahoma,Arial,sans-serif; font-size: 14px; line-height: 14px;" id="LPMetadata_14527744755350.34459329086288415">
www.opensips-solutions.com</div>
<div style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: &quot;wf_segoe-ui_normal&quot;,&quot;Segoe UI&quot;,&quot;Segoe WP&quot;,Tahoma,Arial,sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;" id="LPDescription_14527744755360.9484277675579761">
OpenSIPS is a mature Open Source implementation of a SIP server. OpenSIPS is more than a SIP proxy/router as it includes application-level functionalities.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="moz-cite-prefix">On 13.01.2016 19:53, Rodrigo Pimenta Carvalho wrote:<br>
</div>
<blockquote type="cite">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Dear OpenSIPS-users;</p>
<p><br>
</p>
<p>My OpenSIPS is behind a NAT. The public IP is xxx.xxx.xxx.xx. <br>
</p>
<p>So, I have configured advertised_address=&quot;xxx.xxx.xxx.xx&quot; in my OpenSIPS.</p>
<p><br>
</p>
<p>It seems that such new configurations takes appropriated effect, because a <i>
Record</i>-<i>Route</i> header field in a SIP OK message (for a call that was answered) contains the IP xxx.xxx.xxx.xx, when it arrives to the caller (OpenSIPS adds Record-Rout xxx.xxx.xxx.xx when the SIP INVITE is forwarded).
<br>
</p>
<p><br>
</p>
<p>So, when the caller receives that SIP OK it sends the SIP ACK to IP xxx.xxx.xxx.xx, port 5060. Then OpenSIPS receives the SIP ACK that has Route header field containing the IP xxx.xxx.xxx.xx.</p>
<p><br>
</p>
<p>Now the problem: OpenSIPS refuses the SIP ACK as this message was to another proxy and forward it. As log as the route is xxx.xxx.xxx.xx, the SIP ACK returns to OpenSIPS that forward it again. It becomes a loop.
<br>
</p>
<p><br>
</p>
<p>How to solve this issue? I think there is an error in my OpenSIPS.cfg file.</p>
<p>Any hint?</p>
<p>--------------------------------------------------------------------------------------------------------------------------</p>
<p><br>
</p>
<p>Some details from the log is here:</p>
<p><br>
</p>
<p><font color="#006fc9"><br>
</font></p>
<p><font color="#006fc9"><br>
</font></p>
<p><font color="#006fc9">Jan 13 17:15:28 [680] DBG:core:check_self: host != me<br>
Jan 13 17:15:28 [680] DBG:rr:after_loose: Topmost URI is NOT myself<br>
Jan 13 17:15:28 [680] DBG:rr:after_loose: URI to be processed: 'sip:xxx.xxx.xxx.xx;transport=tcp;lr;nat=yes;did=de2.a332f873'<br>
Jan 13 17:15:28 [680] DBG:rr:after_loose: Next URI is a loose router<br>
Jan 13 17:15:28 [680] DBG:rr:run_rr_callbacks: callback id 1 entered with &lt;transport=tcp;lr;nat=yes;did=de2.a332f873&gt;<br>
Jan 13 17:15:28 [680] DBG:dialog:dlg_onroute: Route param 'did' not found<br>
Jan 13 17:15:28 [680] DBG:core:parse_headers: flags=58<br>
Jan 13 17:15:28 [680] DBG:core:parse_to_param: tag=f97c143e<br>
Jan 13 17:15:28 [680] DBG:core:parse_to: end of header reached, state=29<br>
Jan 13 17:15:28 [680] DBG:core:parse_to: display={&quot;6003&quot;}, ruri={<a class="moz-txt-link-abbreviated" href="mailto:sip:6003@192.168.XXX.XXX;transport=TCP">sip:6003@192.168.XXX.XXX;transport=TCP</a>}<br>
Jan 13 17:15:28 [680] DBG:dialog:get_dlg: input ci=&lt;iGu3D2Ej0BIXJF18BzYQKA..&gt;(24), tt=&lt;f97c143e&gt;(8), ft=&lt;Zw5eZ5e&gt;(7)<br>
Jan 13 17:15:28 [680] DBG:dialog:get_dlg: no dialog callid='iGu3D2Ej0BIXJF18BzYQKA..' found<br>
Jan 13 17:15:28 [680] DBG:dialog:dlg_onroute: Callid 'iGu3D2Ej0BIXJF18BzYQKA..' not found<br>
Jan 13 17:15:28 [680] DBG:rr:add_rr_param: adding (;nat=yes)<br>
Jan 13 17:15:28 [680] DBG:tm:t_newtran: transaction on entrance=0xffffffff<br>
Jan 13 17:15:28 [680] DBG:core:parse_headers: flags=ffffffffffffffff<br>
Jan 13 17:15:28 [680] DBG:core:parse_headers: flags=78<br>
Jan 13 17:15:28 [680] DBG:tm:t_lookup_request: start searching: hash=21281, isACK=1<br>
Jan 13 17:15:28 [680] DBG:tm:matching_3261: RFC3261 transaction matching failed<br>
Jan 13 17:15:28 [680] DBG:tm:t_lookup_request: no transaction found<br>
Jan 13 17:15:28 [680] DBG:tm:t_relay_to: forwarding ACK</font><br>
<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>Best regards.<br>
</p>
<p>&nbsp;<br>
</p>
<br>
<br>
<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>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre>_______________________________________________
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>
<br>
</div>
</div>
</div>
</body>
</html>