[sr-dev] git:master:0640645e: core: updated onsend_route_enabled() macro condtition

Daniel-Constantin Mierla miconda at gmail.com
Wed Apr 14 15:14:54 CEST 2021


Module: kamailio
Branch: master
Commit: 0640645efdbc1f7ce36750d5a784a4cfedc3f02f
URL: https://github.com/kamailio/kamailio/commit/0640645efdbc1f7ce36750d5a784a4cfedc3f02f

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-04-14T15:14:10+02:00

core: updated onsend_route_enabled() macro condtition

- detect when the kemi callbacks need to be executed for tm replies

---

Modified: src/core/onsend.h

---

Diff:  https://github.com/kamailio/kamailio/commit/0640645efdbc1f7ce36750d5a784a4cfedc3f02f.diff
Patch: https://github.com/kamailio/kamailio/commit/0640645efdbc1f7ce36750d5a784a4cfedc3f02f.patch

---

diff --git a/src/core/onsend.h b/src/core/onsend.h
index 744becedce..a78927c190 100644
--- a/src/core/onsend.h
+++ b/src/core/onsend.h
@@ -57,7 +57,9 @@ extern onsend_info_t* p_onsend;
  * WARNING: buf must be 0 terminated (to allow regex matches on it) */
 int run_onsend(sip_msg_t* orig_msg, dest_info_t* dst, char* buf, int len);
 
-#define onsend_route_enabled(rtype) (onsend_rt.rlist[DEFAULT_RT]?((rtype==SIP_REPLY)?onsend_route_reply:1):0)
+#define onsend_route_enabled(rtype) ((onsend_rt.rlist[DEFAULT_RT]? \
+			((rtype==SIP_REPLY)?onsend_route_reply:1):0) \
+			|| (kemi_onsend_route_callback.len>0 && sr_kemi_eng_get()))
 
 int run_onsend_evroute(onsend_info_t *sndinfo, int evrt, str *evcb, str *evname);
 




More information about the sr-dev mailing list