Module: kamailio Branch: 5.8 Commit: a0ee303d8e0079442587042572e8535881b2d045 URL: https://github.com/kamailio/kamailio/commit/a0ee303d8e0079442587042572e85358...
Author: Victor Seva linuxmaniac@torreviejawireless.org Committer: Victor Seva linuxmaniac@torreviejawireless.org Date: 2025-07-21T14:01:20+02:00
ims_dialog: dlg_onroute() use proper tag depending on direction
* needed for correctly updating cseq
(cherry picked from commit a3fdf6dc8f9bf74f937ccde6becb64afd74910a8) (cherry picked from commit c52a6b5a9ce6e328f327d1abc0aaf52443ae298d)
---
Modified: src/modules/ims_dialog/dlg_handlers.c
---
Diff: https://github.com/kamailio/kamailio/commit/a0ee303d8e0079442587042572e85358... Patch: https://github.com/kamailio/kamailio/commit/a0ee303d8e0079442587042572e85358...
---
diff --git a/src/modules/ims_dialog/dlg_handlers.c b/src/modules/ims_dialog/dlg_handlers.c index 3487d7f4c2a..83055205689 100644 --- a/src/modules/ims_dialog/dlg_handlers.c +++ b/src/modules/ims_dialog/dlg_handlers.c @@ -871,6 +871,7 @@ void dlg_onroute(struct sip_msg *req, str *route_params, void *param) dlg_cell_t *dlg; dlg_iuid_t *iuid; str val, callid, ftag, ttag; + str *tag = NULL; int h_entry, h_id, new_state, old_state, unref, event, timeout; unsigned int dir; int ret = 0; @@ -1143,7 +1144,12 @@ void dlg_onroute(struct sip_msg *req, str *route_params, void *param) || new_state == DLG_STATE_EARLY)) {
if(event != DLG_EVENT_REQACK) { - if(update_cseqs(dlg, req, dir, &ttag) != 0) { + if(dir == DLG_DIR_UPSTREAM) { + tag = &ftag; + } else { + tag = &ttag; + } + if(update_cseqs(dlg, req, dir, tag) != 0) { LM_ERR("cseqs update failed\n"); } else { dlg->dflags |= DLG_FLAG_CHANGED;