<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Apple Color Emoji";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.xmsonormal, li.xmsonormal, div.xmsonormal
        {mso-style-name:x_msonormal;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.xxmsonormal, li.xxmsonormal, div.xxmsonormal
        {mso-style-name:x_xmsonormal;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">You don’t have to read very far back in the mailing list archives to see that misrouted ACKs are a fairly common problem when implementing SIP proxies.
<span style="font-family:"Apple Color Emoji"">☺</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Mishandling of the Record-Route headers is the common problem, but loss of connectivity with the far end server can occur as well. Because the INVITE transaction is completed, the TM timers will not catch this and the dialog will stay in
 the CONFIRMED but not ACKed state until the $DLG_timeout expires.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It doesn’t happen very often at all, but if it does and the timeout is set very high then you end up with a stuck call until the timer pops. If you are doing billing on the same endpoint then you potentially end up with a very long call
 being billed.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">There are also other ways to accomplish similar safeguards as this, including OPTIONS or INVITE refreshes using the Dialog module. We are still running 1.11 in production so the INVITE refreshes were not available to us and some of our
 partners do not accept OPTIONS refreshes. We plan to implement the INVITE refreshes once we have completed the upgrade to 2.X.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="color:black">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">Ben Newlin</span><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Users <users-bounces@lists.opensips.org> on behalf of Rodrigo Pimenta Carvalho <pimenta@inatel.br><br>
<b>Reply-To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Date: </b>Tuesday, March 27, 2018 at 12:57 PM<br>
<b>To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Subject: </b>Re: [OpenSIPS-Users] How to terminate a call, via Opensips, before it being answered?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div id="divtagdefaultwrapper">
<p><a name="_MailOriginalBody"><span style="font-size:12.0pt;color:black">Hi. <o:p>
</o:p></span></a></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">Just as curiosity, what would  cause an ACK lost in your system?<o:p></o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">Best regards.<o:p></o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></span></p>
<div id="Signature">
<div name="divtagdefaultwrapper">
<div>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:10.0pt;color:black">RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br>
Ph: +55 35 3471 9200 RAMAL 979<o:p></o:p></span></span></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></span></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">
<hr size="2" width="98%" align="center">
</span></span></div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><b><span style="color:black">De:</span></b></span><span style="mso-bookmark:_MailOriginalBody"><span style="color:black"> Users <users-bounces@lists.opensips.org> em nome de Ben Newlin <Ben.Newlin@genesys.com><br>
<b>Enviado:</b> terça-feira, 27 de março de 2018 11:18<br>
<b>Para:</b> OpenSIPS users mailling list<br>
<b>Assunto:</b> Re: [OpenSIPS-Users] How to terminate a call, via Opensips, before it being answered?</span></span><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">
<o:p></o:p></span></span></p>
<div>
<p class="MsoNormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
</div>
</div>
<div>
<div>
<p class="xmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">Rodrigo,<o:p></o:p></span></span></p>
<p class="xmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
<p class="xmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">Yes, they do. I am using them to do exactly what you describe. The final reply (fr) timer is how long a transaction will wait to receive a final reply
 (>=200). If the timer expires without receiving a final reply the transaction will be canceled and failure route will be triggered with, I think, a local 408 response.<o:p></o:p></span></span></p>
<p class="xmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
<p class="xmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">As for $DLG_timeout, you can set that value multiple times in a call. We do this as well. Prior to the call being ACKed we set this value fairly low
 (~5s) in order to disconnect the dialog if the ACK is lost. Once we receive the ACK, we then extend it to a much longer value.<o:p></o:p></span></span></p>
<p class="xmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
<div>
<p class="xmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">Thanks,<o:p></o:p></span></span></p>
<p class="xmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">Ben Newlin<o:p></o:p></span></span></p>
</div>
<p class="xmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="xmsonormal"><span style="mso-bookmark:_MailOriginalBody"><b><span style="font-size:12.0pt;color:black">From:
</span></b></span><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">Users <users-bounces@lists.opensips.org> on behalf of Rodrigo Pimenta Carvalho <pimenta@inatel.br><br>
<b>Reply-To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Date: </b>Tuesday, March 27, 2018 at 10:08 AM<br>
<b>To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Subject: </b>Re: [OpenSIPS-Users] How to terminate a call, via Opensips, before it being answered?<o:p></o:p></span></span></p>
</div>
<div>
<p class="xmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
</div>
<div id="x_divtagdefaultwrapper">
<p><span style="mso-bookmark:_MailOriginalBody"><a name="x__MailOriginalBody"><span style="font-size:12.0pt;color:black">Ok Ben.</span></a></span><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"><o:p></o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">I will check this possibility and see if reply times will change the duration of a not answered call.<o:p></o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">Thank you.<o:p></o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
<div id="x_Signature">
<div name="x_divtagdefaultwrapper">
<div>
<div>
<p class="xmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:10.0pt;color:black">RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br>
Ph: +55 35 3471 9200 RAMAL 979</span></span><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"><o:p></o:p></span></span></p>
</div>
</div>
</div>
</div>
<p class="xmsonormal" style="margin-bottom:12.0pt"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">
<hr size="2" width="98%" align="center">
</span></span></div>
<div id="x_divRplyFwdMsg">
<p class="xmsonormal"><span style="mso-bookmark:_MailOriginalBody"><b><span style="font-size:12.0pt;color:black">De:</span></b></span><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> Users <users-bounces@lists.opensips.org>
 em nome de Ben Newlin <Ben.Newlin@genesys.com><br>
<b>Enviado:</b> terça-feira, 27 de março de 2018 10:43<br>
<b>Para:</b> OpenSIPS users mailling list<br>
<b>Assunto:</b> Re: [OpenSIPS-Users] How to terminate a call, via Opensips, before it being answered?
<o:p></o:p></span></span></p>
<div>
<p class="xmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
</div>
</div>
<div>
<div>
<p class="xxmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">You can also use the reply timers in TM to do this:
</span></span><a href="http://www.opensips.org/html/docs/modules/2.3.x/tm.html#fr_timeout"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt">http://www.opensips.org/html/docs/modules/2.3.x/tm.html#fr_timeout</span></span><span style="mso-bookmark:_MailOriginalBody"></span></a><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"><o:p></o:p></span></span></p>
<div style="margin-bottom:15.0pt;overflow:auto" id="LPBorder_GT_15221595095260.2548199555547008">
<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="90%" style="width:90.0%;background:white;border-top:dotted #C8C8C8 1.0pt;border-left:none;border-bottom:dotted #C8C8C8 1.0pt;border-right:none">
<tbody>
<tr>
<td valign="top" style="border:none;padding:0in 0in 0in 0in">
<div id="LPTitle_15221595095240.4495226861621229">
<p class="xmsonormal" style="margin-top:15.0pt"><span style="mso-bookmark:_MailOriginalBody"></span><a href="http://www.opensips.org/html/docs/modules/2.3.x/tm.html#fr_timeout" target="_blank"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:16.0pt;font-family:"Segoe UI";text-decoration:none">tm
 Module - openSIPS</span></span><span style="mso-bookmark:_MailOriginalBody"></span></a><span style="mso-bookmark:_MailOriginalBody"><o:p></o:p></span></p>
</div>
<div style="margin-top:7.5pt;margin-bottom:12.0pt" id="LPMetadata_15221595095260.774566076556414">
<p class="xmsonormal" style="margin-top:15.0pt;line-height:10.5pt"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:10.5pt;font-family:"Segoe UI";color:#666666">www.opensips.org</span><o:p></o:p></span></p>
</div>
<div id="LPDescription_15221595095260.21660086474321305">
<p class="xmsonormal" style="margin-top:15.0pt;line-height:15.0pt"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:10.5pt;font-family:"Segoe UI";color:#666666">TM module enables stateful processing of SIP transactions. The main use of stateful
 logic, which is costly in terms of memory and CPU, is some services inherently ...</span><o:p></o:p></span></p>
</div>
</td>
<span style="mso-bookmark:_MailOriginalBody"></span>
</tr>
</tbody>
</table>
</div>
<p class="xxmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
<div>
<p class="xxmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">Thanks,<o:p></o:p></span></span></p>
<p class="xxmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">Ben Newlin<o:p></o:p></span></span></p>
</div>
<p class="xxmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="xxmsonormal"><span style="mso-bookmark:_MailOriginalBody"><b><span style="font-size:12.0pt;color:black">From:
</span></b></span><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">Users <users-bounces@lists.opensips.org> on behalf of Laszlo <laszlo@voipfreak.net><br>
<b>Reply-To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Date: </b>Tuesday, March 27, 2018 at 9:40 AM<br>
<b>To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Subject: </b>Re: [OpenSIPS-Users] How to terminate a call, via Opensips, before it being answered?<o:p></o:p></span></span></p>
</div>
<div>
<p class="xxmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
</div>
<div>
<p class="xxmsonormal"><span style="mso-bookmark:_MailOriginalBody"><a name="x_x__MailOriginalBody"><span style="font-size:12.0pt;color:black"> </span></a></span><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"><o:p></o:p></span></span></p>
<div>
<p class="xxmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
<div>
<p class="xxmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">On Tue, Mar 27, 2018 at 3:31 PM, Rodrigo Pimenta Carvalho <</span></span><a href="mailto:pimenta@inatel.br" target="_blank"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt">pimenta@inatel.br</span></span><span style="mso-bookmark:_MailOriginalBody"></span></a><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">>
 wrote:<o:p></o:p></span></span></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div id="x_x_gmail-m_3794596130446126665divtagdefaultwrapper">
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">Hi.<o:p></o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">When a peer invites another one to a call, there are calling and ringing tones for these peers.<o:p></o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">My SIP agents let these tones execute during 2 minutes. After this, the call is terminated, if no one answers the call.<o:p></o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">How to configure OpenSIPS, if possible, so that any call will be terminated after 1 minute?
<o:p></o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">Any hint will be very helpful!<o:p></o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">Best regards.<o:p></o:p></span></span></p>
<p><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:#888888"> </span></span><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"><o:p></o:p></span></span></p>
<div id="x_x_gmail-m_3794596130446126665Signature">
<div name="x_x_divtagdefaultwrapper">
<div>
<div>
<p class="xxmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:10.0pt;color:#888888">RODRIGO PIMENTA CARVALHO<br>
Inatel Competence Center<br>
Software<br>
Ph: +55 35 3471 9200 RAMAL 979</span></span><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"><o:p></o:p></span></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="xxmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></span></p>
</div>
<div>
<p class="xxmsonormal"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt;color:black">Maybe you can play with $DLG_timeout, see </span></span><a href="http://www.opensips.org/html/docs/modules/2.4.x/dialog.html#timeout-pvar-id"><span style="mso-bookmark:_MailOriginalBody"><span style="font-size:12.0pt">http://www.opensips.org/html/docs/modules/2.4.x/dialog.html#timeout-pvar-id</span></span><span style="mso-bookmark:_MailOriginalBody"></span></a><span style="mso-bookmark:_MailOriginalBody"></span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>