<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Hello,<br>
<br>
One way to handle the ACK timeout scenario that you described is to
initially set the dialog timeout to a low value, then increment to
the desired value after receiving the ACK. Here's a minimal example
with some notes I have. In this config, your call would hang for
5sec before being auto-closed by the dialog module.<br>
<br>
route {<br>
if (has_totag()) {<br>
# sequential request logic<br>
...<br>
if (is_method("ACK"))<br>
$DLG_timeout = 43200; # 12hrs<br>
...<br>
}<br>
<br>
# to handle case of lost ACK, we set low dialog timeout then<br>
# increase once ACK is received; without this the call will stay<br>
# in DLG_STATE=3 until default dialog timeout is met<br>
# NOTE: timer doesn't start until 200 received, so this is
essentially<br>
# an ACK timeout (ie 200 -> ACK)<br>
$DLG_timeout = 5;<br>
<br>
...<br>
# initial request logic<br>
}<br>
<br>
<br>
If the code ever changes to start the DLG timer before the 200, then
this doesn't work... but I think this is baked into RFC and in any
rate my unit tests for this scenario have never failed when
migrating versions :)<br>
<br>
Thanks,<br>
John Burke<br>
<br>
<div class="moz-signature"><br>
</div>
<div class="moz-cite-prefix">On 10/30/22 9:44 AM, M S wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAEZrhoPh8MQdji4dYXX3xZwrb+K6bB2TtofjmsP0h7-rE5tBiQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi list,
<div>When a dialog is created with initial INVITE, it seems like
it is not available to dlg_end_dlg until the call is answered
(OK received) and the caller also acknowledges (ACK) to the OK
message.</div>
<div>So in a scenario where a caller sends an INVITE and then
dies, the call goes to callee, gets answered, OK is sent to
caller but there is no response, and the dialog stays open
until default_timeout and that's when the CDR is generated (if
default_timeout is 12 hours then a 12 hour call is in CDR).</div>
<div>Anybody has any ideas how we can fix this? If I use PpB for
dialog, it never PINGs the callee because apparently the
dialog is not fully established on the callee side. If I use
rtpengine to detect media timeout, it correctly detects it but
when it calls dlg_end_dlg opensips says "dialog not found".</div>
<div><br>
</div>
<div>Thank you!</div>
</div>
<br>
--<br>
<table style="border-collapse: collapse; width: 100%; height:
64px; background-color: #fd3d14;" border="1">
<tbody>
<tr style="height: 64px;">
<td style="width: 100%; height: 64px; text-align: center;">
<pre><span style="background-color: #fd3d14; color: #ffffff;"><strong><span style="font-size: 300%;"> Please be cautious!</span></strong>
<span style="font-size: x-large;"> This email was sent from outside of Voxtelesys.</span></span></pre>
</td>
</tr>
</tbody>
</table>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
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>
</body>
</html>