From d6fbff7d8f6e4368e29bf5e52efda024ebe3dab9 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Fri, 9 Mar 2018 09:45:34 +0100 Subject: [PATCH] app_python3: check if kemi onsend_route callback name is set --- src/modules/app_python3/apy_kemi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/app_python3/apy_kemi.c b/src/modules/app_python3/apy_kemi.c index 97b39dfd724..d053ac1b7de 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,