<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello Mathieu,<br>
</p>
<p><br>
</p>
<p>I think as well that the right solution would be to add the missing states to the synchronisation. I could imagine that they maybe would be left out because of the additional implementation effort.</p>
<p><br>
</p>
<p>If you create a pull request we would happy to review and apply, if it fits.</p>
<p><br>
</p>
<p>Cheers,</p>
<p><br>
</p>
<p>Henning<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">Am 01.07.19 um 12:32 schrieb Mathieu Bodjikian:<br>
</div>
<blockquote type="cite" cite="mid:09283e5ac93e4f7dab07e5b4cf5aab1f@corp.ovh.com">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div>Hello,<br>
<br>
We are using DMQ module to sync dialogs between 3 Kamailio boxes.<br>
<br>
We are using last Kamailio version (5.2.3).<br>
<br>
>From our understanding, the state  DLG_STATE_CONFIRMED_NA is not synced over DMQ (<a class="moz-txt-link-freetext" href="https://github.com/kamailio/kamailio/blob/a84a3ea618f0e602a8892c37fce7f4e72ab7371c/src/modules/dialog/dlg_dmq.c#L464">https://github.com/kamailio/kamailio/blob/a84a3ea618f0e602a8892c37fce7f4e72ab7371c/src/modules/dialog/dlg_dmq.c#L464</a>)<br>
<br>
With containerized environement, the ACK's can go to any Kamailio instance, which lead to :<br>
<br>
On first box :<br>
    -> INVITE    received   -> Dialog created + KDMQ sent (state DLG_STATE_UNCONFIRMED)<br>
    -> 180 | 183 received   -> Dialog updated + KDMQ sent (state DLG_STATE_EARLY)<br>
    -> 200       received   -> Dialog updated + KDMQ NOT sent (DLG_STATE_CONFIRMED_NA)<br>
<br>
On second box :<br>
    -> ACK received :<br>
        - next_state_dlg(): bogus event 6 in state 2 for dlg<br>
        - dialog not updated<br>
        - KDMQ with state DLG_STATE_CONFIRMED not sent<br>
<br>
<br>
On first box, after timeout :<br>
   -> After timeout :<br>
        - dialg with incorrect timeouts (since box2 didn't send dialog update)<br>
        - tm sends BYE in both ways<br>
        - bye_reply_cb(): inconsitent dlg timer data on dlg<br>
<br>
<br>
<br>
We see two solutions :<br>
    - We add DLG_STATE_CONFIRMED_NA to states we sync on dlg_dmq_replicate_action<br>
<br>
    - We manage to route the ACK on the same instance that received first INVITE (could be tricky)<br>
<br>
<br>
Which one is preferable ?<br>
<br>
<br>
Kind regards,<br>
Mathieu Bodjikian</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Henning Westerholt - <a class="moz-txt-link-freetext" href="https://skalatan.de/blog/">https://skalatan.de/blog/</a>
Kamailio services - <a class="moz-txt-link-freetext" href="https://skalatan.de/services">https://skalatan.de/services</a></pre>
</body>
</html>