[sr-dev] git:master:d96429c9: app_sqlang: check if kemi onsend_route callback name is set

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


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

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

app_sqlang: check if kemi onsend_route callback name is set

---

Modified: src/modules/app_sqlang/app_sqlang_mod.c

---

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

---

diff --git a/src/modules/app_sqlang/app_sqlang_mod.c b/src/modules/app_sqlang/app_sqlang_mod.c
index 9f85b012ba..6bbf70e199 100644
--- a/src/modules/app_sqlang/app_sqlang_mod.c
+++ b/src/modules/app_sqlang/app_sqlang_mod.c
@@ -166,7 +166,11 @@ int sr_kemi_config_engine_sqlang(sip_msg_t *msg, int rtype, str *rname,
 			ret = app_sqlang_run_ex(msg, rname->s, NULL, NULL, NULL, 0);
 		}
 	} else if(rtype==ONSEND_ROUTE) {
-		ret = app_sqlang_run_ex(msg, "ksr_onsend_route", NULL, NULL, NULL, 0);
+		if(kemi_onsend_route_callback.len>0) {
+			ret = app_sqlang_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_sqlang_run_ex(msg, rname->s,




More information about the sr-dev mailing list