Module: kamailio
Branch: master
Commit: d6fbff7d8f6e4368e29bf5e52efda024ebe3dab9
URL:
https://github.com/kamailio/kamailio/commit/d6fbff7d8f6e4368e29bf5e52efda02…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-03-09T09:45:34+01:00
app_python3: check if kemi onsend_route callback name is set
---
Modified: src/modules/app_python3/apy_kemi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d6fbff7d8f6e4368e29bf5e52efda02…
Patch:
https://github.com/kamailio/kamailio/commit/d6fbff7d8f6e4368e29bf5e52efda02…
---
diff --git a/src/modules/app_python3/apy_kemi.c b/src/modules/app_python3/apy_kemi.c
index 97b39dfd72..d053ac1b7d 100644
--- a/src/modules/app_python3/apy_kemi.c
+++ b/src/modules/app_python3/apy_kemi.c
@@ -82,7 +82,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,