Module: kamailio Branch: master Commit: 0ed4ca18755937d07f47f954c7fc6de176beef0e URL: https://github.com/kamailio/kamailio/commit/0ed4ca18755937d07f47f954c7fc6de176beef0e
Author: Stefan Mititelu <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2026-07-01T08:32:44+02:00 dialog: on received ACK, bump dmq replicated dlg to CONFIRMED state --- Modified: src/modules/dialog/dlg_dmq.c Modified: src/modules/dialog/dlg_hash.c --- Diff: https://github.com/kamailio/kamailio/commit/0ed4ca18755937d07f47f954c7fc6de176beef0e.diff Patch: https://github.com/kamailio/kamailio/commit/0ed4ca18755937d07f47f954c7fc6de176beef0e.patch --- diff --git a/src/modules/dialog/dlg_dmq.c b/src/modules/dialog/dlg_dmq.c index 58b6dc0e351..97522d9103e 100644 --- a/src/modules/dialog/dlg_dmq.c +++ b/src/modules/dialog/dlg_dmq.c @@ -337,16 +337,24 @@ int dlg_dmq_handle_msg( case DLG_STATE_EARLY: dlg->start_ts = start_ts; dlg->lifetime = lifetime; - dlg_set_leg_info( - dlg, &tag1, &route_set1, &contact1, &cseq1, 0); + /* apply leg info if it carries data */ + if(tag1.len > 0) { + dlg_set_leg_info( + dlg, &tag1, &route_set1, &contact1, &cseq1, 0); + } break; case DLG_STATE_CONFIRMED: dlg->start_ts = start_ts; dlg->lifetime = lifetime; - dlg_set_leg_info( - dlg, &tag1, &route_set1, &contact1, &cseq1, 0); - dlg_set_leg_info( - dlg, &tag2, &route_set2, &contact2, &cseq2, 1); + /* apply leg info if it carries data */ + if(tag1.len > 0) { + dlg_set_leg_info( + dlg, &tag1, &route_set1, &contact1, &cseq1, 0); + } + if(tag2.len > 0) { + dlg_set_leg_info( + dlg, &tag2, &route_set2, &contact2, &cseq2, 1); + } if(insert_dlg_timer(&dlg->tl, dlg->lifetime) != 0) { LM_CRIT("Unable to insert dlg timer %p [%u:%u]\n", dlg, dlg->h_entry, dlg->h_id); diff --git a/src/modules/dialog/dlg_hash.c b/src/modules/dialog/dlg_hash.c index d8fe4f9bc91..cc8b46a2a42 100644 --- a/src/modules/dialog/dlg_hash.c +++ b/src/modules/dialog/dlg_hash.c @@ -1279,6 +1279,12 @@ void next_state_dlg( case DLG_STATE_DELETED: break; default: + /* if dmq replicated dialog received ACK */ + if((dlg->iflags & DLG_IFLAG_DMQ_SYNC) + && !(dlg->dflags & DLG_FLAG_TM)) { + dlg->state = DLG_STATE_CONFIRMED; + break; + } log_next_state_dlg(event, dlg); } break; _______________________________________________ Kamailio - Development Mailing List -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
