Module: kamailio Branch: master Commit: 9bbef2560cb14c64de9face52e843d0ab3524e6a URL: https://github.com/kamailio/kamailio/commit/9bbef2560cb14c64de9face52e843d0a...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2018-03-09T09:45:10+01:00
app_lua: check if kemi onsend_route callback name is set
---
Modified: src/modules/app_lua/app_lua_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/9bbef2560cb14c64de9face52e843d0a... Patch: https://github.com/kamailio/kamailio/commit/9bbef2560cb14c64de9face52e843d0a...
---
diff --git a/src/modules/app_lua/app_lua_mod.c b/src/modules/app_lua/app_lua_mod.c index ac536878c9..b4786b2745 100644 --- a/src/modules/app_lua/app_lua_mod.c +++ b/src/modules/app_lua/app_lua_mod.c @@ -140,7 +140,11 @@ int sr_kemi_config_engine_lua(sip_msg_t *msg, int rtype, str *rname, ret = app_lua_run_ex(msg, rname->s, NULL, NULL, NULL, 0); } } else if(rtype==ONSEND_ROUTE) { - ret = app_lua_run_ex(msg, "ksr_onsend_route", NULL, NULL, NULL, 0); + if(kemi_onsend_route_callback.len>0) { + ret = app_lua_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_lua_run_ex(msg, rname->s,