<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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,Helvetica,sans-serif;" dir="ltr">
<p></p>
<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 (https://github.com/kamailio/kamailio/blob/a84a3ea618f0e602a8892c37fce7f4e72ab7371c/src/modules/dialog/dlg_dmq.c#L464)<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>
<p></p>
</div>
</body>
</html>