Module: kamailio
Branch: master
Commit: b9c3286e47d602f194dd750dce4759ad0d9f578c
URL:
https://github.com/kamailio/kamailio/commit/b9c3286e47d602f194dd750dce4759a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-03-09T09:45:23+01:00
app_python: check if kemi onsend_route callback name is set
---
Modified: src/modules/app_python/apy_kemi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b9c3286e47d602f194dd750dce4759a…
Patch:
https://github.com/kamailio/kamailio/commit/b9c3286e47d602f194dd750dce4759a…
---
diff --git a/src/modules/app_python/apy_kemi.c b/src/modules/app_python/apy_kemi.c
index 9a683250de..f71a8171e7 100644
--- a/src/modules/app_python/apy_kemi.c
+++ b/src/modules/app_python/apy_kemi.c
@@ -79,7 +79,10 @@ int sr_kemi_config_engine_python(sip_msg_t *msg, int rtype, str
*rname,
ret = apy_exec(msg, rname->s, NULL, 0);
}
} else if(rtype==ONSEND_ROUTE) {
- ret = apy_exec(msg, "ksr_onsend_route", NULL, 0);
+ if(kemi_onsend_route_callback.len>0) {
+ ret = apy_exec(msg, kemi_onsend_route_callback.s, NULL, 0);
+ }
+ return 1;
} else if(rtype==EVENT_ROUTE) {
if(rname!=NULL && rname->s!=NULL) {
ret = apy_exec(msg, rname->s,