<div dir="ltr">Hello,<div><br></div><div>iirc, if the ACK is not received or not matched with the dialog, then the module is doing a 'hard' cleanup in like 1-2 minute of 'unconfirmed dialogs'. Likely the BYE is ignored in regards to updating dialog state if the dialog is not marked as answered (not yet in confirmed state).</div><div><br></div><div>Cheers,<br>Daniel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 25, 2017 at 5:38 PM, Alex Balashov <span dir="ltr"><<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I'm running 4.3.5:1b0c0a and have run into two distinct, bizarre issues<br>
with the dialog module that I am unable to explain.<br>
<br>
In all cases, I am using $dlg_ctx(send_bye) = 1, and passing in a dialog<br>
timeout of 7200 sec via AVP (timeout_avp modparam).<br>
<br>
1) Local BYEs are sent after either ~60 or ~120 sec --<br>
<br>
This happens on a very small number of answered calls for no apparent<br>
reason. I have spent days poring through the traces trying to figure out<br>
if there's anything eccentric about how the messages, but can't find<br>
anything out of the ordinary except (a) 1 retransmission of 200 OK to<br>
INVITE due to not receiving ACK fast enough due to end-to-end latency,<br>
and (b) consequently, retransmission of ACK.<br>
<br>
My understanding is that the dialog module does not prophylactically end<br>
calls as a response to strange or improper messaging, but only (a) when<br>
the dialog timeout is reached or (b) keepalive OPTION pings (if enabled)<br>
fail.<br>
<br>
Keepalive OPTIONS pings are not enabled in these scenarios, and are not<br>
sent in the traces.<br>
<br>
(2) Local BYEs sent in response to race conditions that result in<br>
strange dialog state transitions --<br>
<br>
There are some calls that look something like:<br>
<br>
A. Caller INVITEs callee;<br>
B. Callee sends progress;<br>
C. Callee sends 200 OK answer and immediately sends BYE (e.g. 1 ms<br>
later);<br>
D. Kamailio receives these nearly simultaneously and forwards the BYE<br>
first;<br>
E. Caller sends 487 Request Terminated response (processing BYE as if it<br>
were CANCEL);<br>
F. Kamailio forwards 200 OK back to caller, who ignores it.<br>
G. Callee retransmits 200 OK through Kamailio.<br>
<br>
A few minutes later, Kamailio sends BYE in both directions even though<br>
dialog should have been removed from state tracking long ago because of<br>
the dispositive 487 reply.<br>
<br>
...<br>
<br>
In particular, I'm curious as to whether there have been any fixes to<br>
deal with scenarios like #2 since 4.3.5. I wasn't able to spot any<br>
obvious ones in the commit history for the module. I'm also at a<br>
complete loss to explain #1.<br>
<br>
I have traces for all of these scenarios, but would prefer to send<br>
privately.<br>
<br>
Many thanks!<br>
<span class="HOEnZb"><font color="#888888"><br>
-- Alex<br>
<br>
--<br>
Alex Balashov | Principal | Evariste Systems LLC<br>
<br>
Tel: <a href="tel:%2B1-706-510-6800" value="+17065106800">+1-706-510-6800</a> / <a href="tel:%2B1-800-250-5920" value="+18002505920">+1-800-250-5920</a> (toll-free)<br>
Web: <a href="http://www.evaristesys.com/" rel="noreferrer" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.csrpswitch.com/" rel="noreferrer" target="_blank">http://www.csrpswitch.com/</a><br>
<br>
______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a></div><div><a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></div></div></div></div></div>
</div>