Module: kamailio Branch: 5.2 Commit: 7b10327189fc6c1cf1c53fc7c90bed84753ec54b URL: https://github.com/kamailio/kamailio/commit/7b10327189fc6c1cf1c53fc7c90bed84753ec54b
Author: Victor Seva <linuxman...@torreviejawireless.org> Committer: Victor Seva <linuxman...@torreviejawireless.org> Date: 2019-11-21T10:05:00+01:00 tm: execute TMCB_REQUEST_FWDED cb as BRANCH_ROUTE when necessary (cherry picked from commit bc40eaa4fe446bffd9f41d5d6b21becd7b7fdc87) --- Modified: src/modules/tm/t_fwd.c --- Diff: https://github.com/kamailio/kamailio/commit/7b10327189fc6c1cf1c53fc7c90bed84753ec54b.diff Patch: https://github.com/kamailio/kamailio/commit/7b10327189fc6c1cf1c53fc7c90bed84753ec54b.patch --- diff --git a/src/modules/tm/t_fwd.c b/src/modules/tm/t_fwd.c index 2ad86a3f88..99f6034039 100644 --- a/src/modules/tm/t_fwd.c +++ b/src/modules/tm/t_fwd.c @@ -376,15 +376,19 @@ static int prepare_new_uac( struct cell *t, struct sip_msg *i_req, goto error03; } } + /* run the specific callbacks for this transaction */ + if (unlikely(has_tran_tmcbs(t, TMCB_REQUEST_FWDED))) + run_trans_callbacks( TMCB_REQUEST_FWDED , t, i_req, 0, + -i_req->REQ_METHOD); + tm_ctx_set_branch_index(T_BR_UNDEFINED); set_route_type(backup_route_type); + } else { + /* run the specific callbacks for this transaction */ + if (unlikely(has_tran_tmcbs(t, TMCB_REQUEST_FWDED))) + run_trans_callbacks( TMCB_REQUEST_FWDED , t, i_req, 0, + -i_req->REQ_METHOD); } - - /* run the specific callbacks for this transaction */ - if (unlikely(has_tran_tmcbs(t, TMCB_REQUEST_FWDED))) - run_trans_callbacks( TMCB_REQUEST_FWDED , t, i_req, 0, - -i_req->REQ_METHOD); - if (likely( !(flags & UAC_DNS_FAILOVER_F) && i_req->dst_uri.s && i_req->dst_uri.len)){ /* no dns failover and non-empty dst_uri => use it as dst _______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev