Module: kamailio
Branch: master
Commit: 0b70cc0be34fe8cbc4f5335a87131ca21e5491c8
URL:
https://github.com/kamailio/kamailio/commit/0b70cc0be34fe8cbc4f5335a87131ca…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-04-21T15:41:25+02:00
app_lua: extended kemi handler to deal with str-str-int-int params
---
Modified: modules/app_lua/app_lua_sr.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0b70cc0be34fe8cbc4f5335a87131ca…
Patch:
https://github.com/kamailio/kamailio/commit/0b70cc0be34fe8cbc4f5335a87131ca…
---
diff --git a/modules/app_lua/app_lua_sr.c b/modules/app_lua/app_lua_sr.c
index 256c3b0..a869c52 100644
--- a/modules/app_lua/app_lua_sr.c
+++ b/modules/app_lua/app_lua_sr.c
@@ -1630,6 +1630,13 @@ int sr_kemi_exec_func(lua_State* L, str *mname, int midx, str
*fname)
ret = ((sr_kemi_fmssss_f)(ket->func))(env_L->msg,
&vps[0].s, &vps[1].s, &vps[2].s, &vps[3].s);
return sr_kemi_return(L, ket, ret);
+ } else if(ket->ptypes[0]==SR_KEMIP_STR
+ || ket->ptypes[1]==SR_KEMIP_STR
+ || ket->ptypes[2]==SR_KEMIP_INT
+ || ket->ptypes[3]==SR_KEMIP_INT) {
+ ret = ((sr_kemi_fmssnn_f)(ket->func))(env_L->msg,
+ &vps[0].s, &vps[1].s, vps[2].n, vps[3].n);
+ return sr_kemi_return(L, ket, ret);
} else {
LM_ERR("invalid parameters for: %.*s\n",
fname->len, fname->s);