Module: kamailio
Branch: 5.1
Commit: 6275646db39c9c6b48eb4afffd1e71b89ea3e504
URL:
https://github.com/kamailio/kamailio/commit/6275646db39c9c6b48eb4afffd1e71b…
Author: AntonyA <ascanio.alba7(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-03-14T11:23:18+01:00
core: invoke KEMI ksr_onsend_route()
This will invoke ksr_onsend_route() unconditionally in the cfgengine.
(cherry picked from commit 4494b60c430f5e5c6a3a3eb4c025f206a9c3a1f7)
---
Modified: src/core/onsend.h
---
Diff:
https://github.com/kamailio/kamailio/commit/6275646db39c9c6b48eb4afffd1e71b…
Patch:
https://github.com/kamailio/kamailio/commit/6275646db39c9c6b48eb4afffd1e71b…
---
diff --git a/src/core/onsend.h b/src/core/onsend.h
index a2e8f569fd..16ea5ce17c 100644
--- a/src/core/onsend.h
+++ b/src/core/onsend.h
@@ -70,7 +70,9 @@ static inline int run_onsend(sip_msg_t* orig_msg, dest_info_t* dst,
return 1;
}
ret=1;
- if (onsend_rt.rlist[DEFAULT_RT]){
+ // do if onsend_route{} or cfgengine exists
+ keng = sr_kemi_eng_get();
+ if (onsend_rt.rlist[DEFAULT_RT] || keng){
onsnd_info.to=&dst->to;
onsnd_info.send_sock=dst->send_sock;
onsnd_info.buf=buf;
@@ -86,8 +88,7 @@ static inline int run_onsend(sip_msg_t* orig_msg, dest_info_t* dst,
orig_msg->fwd_send_flags=dst->send_flags; /* intial value */
init_run_actions_ctx(&ra_ctx);
- keng = sr_kemi_eng_get();
- if(unlikely(keng!=NULL)) {
+ if(keng) {
bctx = sr_kemi_act_ctx_get();
sr_kemi_act_ctx_set(&ra_ctx);
ret=keng->froute(orig_msg, ONSEND_ROUTE, NULL, NULL);