<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<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;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p><br>
</p>
<div>
<div>Hi. Răzvan.<br>
<br>
Thanks to your support, I have found the issue, after some weeks of tests! Now I need to discover how to fix it or a workaround.<br>
<br>
The problem is:<br>
<br>
<br>
Peer A and peer B is connected to the OpenSIPS (OpenSIPS is behind a NAT with public IP = 111.111.240.71). A is in the same hardware as OpenSIPs and B is in another machine. So, OpenSIPs has:<br>
<br>
Connection A ::&nbsp; ID=1 Type=tcp State=0 Source=127.0.0.1:32908 Destination=127.0.0.1:5060 Lifetime=1970-01-02 05:26:31<br>
Connection B ::&nbsp; ID=2 Type=tcp State=0 Source=111.111.240.71:55229 Destination=192.168.0.101:5060 Lifetime=1970-01-02 05:29:50<br>
<br>
When A calls B, the 'contact' in SIP INVITE has Source=127.0.0.1:3290.<br>
When B answers with SIP OK, A sends a SIP UPDATE. This UPDATE has a 'contact' with a new value: Source=111.111.240.71:57186. So, OpenSIPS has:<br>
<br>
Connection A'::&nbsp; ID=1 Type=tcp State=0 Source=127.0.0.1:32908 Destination=127.0.0.1:5060 Lifetime=1970-01-02 05:33:43<br>
Connection B::&nbsp; ID=2 Type=tcp State=0 Source=111.111.240.71:55229 Destination=192.168.0.101:5060 Lifetime=1970-01-02 05:29:51<br>
Connection A&quot;::&nbsp; ID=3 Type=tcp State=0 Source=111.111.240.71:57186 Destination=192.168.0.101:5060 Lifetime=1970-01-02 05:29:51 (new socket to A)<br>
<br>
However, the new socket between A and OpenSIPS expires in 30 seconds.<br>
Then, when B sends SIP BYE, OpenSIPS tries to forward such SIP message to Source=111.111.240.71:57186, which is expired.<br>
<br>
Peer A and B use ICE.<br>
I would like to fix this issue by means of the OpenSIPS script, to avoid changing the client's code.<br>
Could you suggest me some idea?<br>
<br>
Any hint will be very helpful!<br>
Best regards.<br>
<br>
P.S.: I'm using validate_dialog, but not fix_route_dialog() yet. Could this las function be the solution?</div>
<br>
</div>
<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 Răzvan Crainea &lt;razvan@opensips.org&gt;<br>
<b>Enviado:</b> quarta-feira, 9 de novembro de 2016 08:29<br>
<b>Para:</b> users@lists.opensips.org<br>
<b>Assunto:</b> Re: [OpenSIPS-Users] How to make OpenSIPS send SIP BYE, by configuration, , before dialog timout?</font>
<div>&nbsp;</div>
</div>
<div><tt>Hi, Rodrigo!<br>
<br>
The only HACK that I can think of is when you get the BYE message, set the dialog timeout to 0, match it against the dialog, and then drop the message. OpenSIPS will behave as if the dialog expired in that moment.<br>
<br>
However, you seem to have a flow logic - most likely the Contact header in the BYE is not correct. Could you send&nbsp; us a trace to help you figure out what the problem is? Also, did you try to validate the message against the dialog[1] and fix it accordingly[2]?<br>
<br>
[1] <a previewremoved="true" id="LPlnk286010" class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.2.x/dialog#id295894">
http://www.opensips.org/html/docs/modules/2.2.x/dialog#id295894</a><br>
[2] <a previewremoved="true" id="LPlnk182176" class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.2.x/dialog#id295982">
http://www.opensips.org/html/docs/modules/2.2.x/dialog#id295982</a><br>
<br>
Best regards,<br>
</tt>
<pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a previewremoved="true" id="LPlnk107932" class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
<div style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;" id="LPBorder_GT_14787004394710.2849142898943675">
<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_14787004394420.009346889358992416" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;" id="TextCell_14787004394680.5117088925146647">
<div id="LPRemovePreviewContainer_14787004394680.13610376853295425"></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_14787004394680.7979597551428218">
<a target="_blank" href="http://www.opensips-solutions.com/" style="text-decoration: none;" id="LPUrlAnchor_14787004394700.3711606724489809">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_14787004394700.7220852665465745">
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_14787004394710.747435930312379">
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 11/08/2016 10:07 PM, Rodrigo Pimenta Carvalho wrote:<br>
</div>
<blockquote type="cite">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi.</p>
<p><br>
</p>
<p>Dialogs in my OpenSIPS is programmed to finish after 60 seconds. (timeout = 1 minute).</p>
<p>So, when 2 peers are in a dialog, OpenSIPS sends SIP BYE to both peers, automatically after 60 seconds.</p>
<p><br>
</p>
<p>Is it possible to make OpenSIPS send this exact kind of SIP BYE to both peers,
<span>before the dialog timeout? </span>I mean, in a configured way (opensips.cfg)?</p>
<p><br>
</p>
<p>When OpenSISP sends SIP BYE automatically, both peers receive the SIP BYE correctly.</p>
<p>However, when a peer sends SIP BYE, it reaches the OpenSIPS, but OpenSIPS is unable to forward this SIP BYE. Due to some unknown reason, in this moment there is no open socket to communicate with such peer. That is why I would like to make OpenSIPS&nbsp;send
 'its own' SIP BYE, and see if such idea will simulate a normal situation, until I discover why there is a socket problem.</p>
<p><br>
</p>
<p>Any hint will be very helpful!</p>
<p><br>
</p>
<p>Best regards.<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>
</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>