Module: kamailio Branch: master Commit: d19bc791216445aef3c1b3f9d6eaee8d249fd256 URL: https://github.com/kamailio/kamailio/commit/d19bc791216445aef3c1b3f9d6eaee8d249fd256
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2026-01-08T20:41:42+01:00 tm: take in consideration msg_apply_changes_mode parament --- Modified: src/modules/tm/t_lookup.c --- Diff: https://github.com/kamailio/kamailio/commit/d19bc791216445aef3c1b3f9d6eaee8d249fd256.diff Patch: https://github.com/kamailio/kamailio/commit/d19bc791216445aef3c1b3f9d6eaee8d249fd256.patch --- diff --git a/src/modules/tm/t_lookup.c b/src/modules/tm/t_lookup.c index 5350cacff8a..86c5b093bcb 100644 --- a/src/modules/tm/t_lookup.c +++ b/src/modules/tm/t_lookup.c @@ -642,7 +642,7 @@ int t_request_search(struct sip_msg *p_msg, struct cell **r_cell) /* request matched ! */ LM_DBG("non-ACK matched\n"); goto found; - } /* synonym loop */ + } /* synonym loop */ } else { /* it's an ACK request*/ /* all the transactions from the entry are compared */ clist_foreach(hash_bucket, p_cell, next_c) @@ -730,7 +730,7 @@ int t_request_search(struct sip_msg *p_msg, struct cell **r_cell) LM_DBG("non-2xx ACK matched\n"); goto found; } /* synonym loop */ - } /* ACK */ + } /* ACK */ notfound: @@ -890,7 +890,7 @@ int t_lookup_request(struct sip_msg *p_msg, int leave_new_locked, int *cancel) /* request matched ! */ LM_DBG("non-ACK matched\n"); goto found; - } /* synonym loop */ + } /* synonym loop */ } else { /* it's an ACK request*/ /* all the transactions from the entry are compared */ clist_foreach(hash_bucket, p_cell, next_c) @@ -978,7 +978,7 @@ int t_lookup_request(struct sip_msg *p_msg, int leave_new_locked, int *cancel) LM_DBG("non-2xx ACK matched\n"); goto found; } /* synonym loop */ - } /* ACK */ + } /* ACK */ notfound: @@ -1831,6 +1831,20 @@ static inline int new_t(struct sip_msg *p_msg) { struct cell *new_cell; + if(ksr_msg_apply_changes_mode == 1) { + if(sip_msg_apply_changes(p_msg) < 0) { + return E_BAD_REQ; + } + if(parse_headers(p_msg, HDR_EOH_F, 0)) { + LM_ERR("parse_headers failed\n"); + return E_BAD_REQ; + } + if((p_msg->parsed_flag & HDR_EOH_F) != HDR_EOH_F) { + LM_ERR("EoH not parsed\n"); + return E_UNEXPECTED_STATE; + } + } + /* for ACK-dlw-wise matching, we want From-tags */ if(p_msg->REQ_METHOD == METHOD_INVITE && parse_from_header(p_msg) < 0) { LM_ERR("no valid From in INVITE\n"); _______________________________________________ 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!
