Module: kamailio
Branch: master
Commit: b5dd847e5b81fe8ad0b32fc566d8524382b2d5d2
URL:
https://github.com/kamailio/kamailio/commit/b5dd847e5b81fe8ad0b32fc566d8524…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-12-04T14:58:32+01:00
app_lua: support executing kemi functions with (str*, str*, int, int, str*) params
---
Modified: src/modules/app_lua/app_lua_sr.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b5dd847e5b81fe8ad0b32fc566d8524…
Patch:
https://github.com/kamailio/kamailio/commit/b5dd847e5b81fe8ad0b32fc566d8524…
---
diff --git a/src/modules/app_lua/app_lua_sr.c b/src/modules/app_lua/app_lua_sr.c
index 89b3a9fd40..8009f2970a 100644
--- a/src/modules/app_lua/app_lua_sr.c
+++ b/src/modules/app_lua/app_lua_sr.c
@@ -1853,6 +1853,16 @@ int sr_kemi_lua_exec_func_ex(lua_State* L, sr_kemi_t *ket, int
pdelta)
&vps[0].s, &vps[1].s, &vps[2].s, &vps[3].s,
&vps[4].s);
return sr_kemi_lua_return_int(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
+ && ket->ptypes[4]==SR_KEMIP_STR) {
+ ret = ((sr_kemi_fmssnns_f)(ket->func))(env_L->msg,
+ &vps[0].s, &vps[1].s, vps[2].n, vps[3].n,
+ &vps[4].s);
+ return sr_kemi_lua_return_int(L, ket, ret);
+
} else {
LM_ERR("invalid parameters for: %.*s\n",
fname->len, fname->s);