[sr-dev] git:master:31aee738: app_jsdt: check if kemi onsend_route callback name is set

Daniel-Constantin Mierla miconda at gmail.com
Fri Mar 9 09:46:31 CET 2018


Module: kamailio
Branch: master
Commit: 31aee7380ba1aa0cb6eddeaae709829087504aae
URL: https://github.com/kamailio/kamailio/commit/31aee7380ba1aa0cb6eddeaae709829087504aae

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-03-09T09:44:10+01:00

app_jsdt: check if kemi onsend_route callback name is set

---

Modified: src/modules/app_jsdt/app_jsdt_mod.c

---

Diff:  https://github.com/kamailio/kamailio/commit/31aee7380ba1aa0cb6eddeaae709829087504aae.diff
Patch: https://github.com/kamailio/kamailio/commit/31aee7380ba1aa0cb6eddeaae709829087504aae.patch

---

diff --git a/src/modules/app_jsdt/app_jsdt_mod.c b/src/modules/app_jsdt/app_jsdt_mod.c
index 49f3670ff1..bbafc66972 100644
--- a/src/modules/app_jsdt/app_jsdt_mod.c
+++ b/src/modules/app_jsdt/app_jsdt_mod.c
@@ -165,7 +165,11 @@ int sr_kemi_config_engine_jsdt(sip_msg_t *msg, int rtype, str *rname,
 			ret = app_jsdt_run_ex(msg, rname->s, NULL, NULL, NULL, 0);
 		}
 	} else if(rtype==ONSEND_ROUTE) {
-		ret = app_jsdt_run_ex(msg, "ksr_onsend_route", NULL, NULL, NULL, 0);
+		if(kemi_onsend_route_callback.len>0) {
+			ret = app_jsdt_run_ex(msg, kemi_onsend_route_callback.s,
+					NULL, NULL, NULL, 0);
+		}
+		return 1;
 	} else if(rtype==EVENT_ROUTE) {
 		if(rname!=NULL && rname->s!=NULL) {
 			ret = app_jsdt_run_ex(msg, rname->s,




More information about the sr-dev mailing list