Module: kamailio
Branch: master
Commit: 6bc7853a114fb000744cba3a43f346f71e640452
URL:
https://github.com/kamailio/kamailio/commit/6bc7853a114fb000744cba3a43f346f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-05-03T09:06:07+02:00
app_python3: handle kemi sssi parameters
---
Modified: src/modules/app_python3/apy_kemi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6bc7853a114fb000744cba3a43f346f…
Patch:
https://github.com/kamailio/kamailio/commit/6bc7853a114fb000744cba3a43f346f…
---
diff --git a/src/modules/app_python3/apy_kemi.c b/src/modules/app_python3/apy_kemi.c
index 380821389a..b01ac53890 100755
--- a/src/modules/app_python3/apy_kemi.c
+++ b/src/modules/app_python3/apy_kemi.c
@@ -358,6 +358,22 @@ PyObject *sr_apy_kemi_exec_func_ex(sr_kemi_t *ket, PyObject *self,
PyObject *arg
fname.len, fname.s, vps[0].s.len, vps[0].s.s,
vps[1].s.len, vps[1].s.s, vps[2].s.len, vps[2].s.s,
vps[3].s.len, vps[3].s.s);
+ } else if(ket->ptypes[0]==SR_KEMIP_STR
+ && ket->ptypes[1]==SR_KEMIP_STR
+ && ket->ptypes[2]==SR_KEMIP_STR
+ && ket->ptypes[3]==SR_KEMIP_INT) {
+ if(!PyArg_ParseTuple(args, "sssi:kemi-param-sssn",
+ &vps[0].s.s, &vps[1].s.s, &vps[2].s.s, &vps[3].n)) {
+ LM_ERR("unable to retrieve str-str-str-int params %d\n", i);
+ return sr_kemi_apy_return_false();
+ }
+ vps[0].s.len = strlen(vps[0].s.s);
+ vps[1].s.len = strlen(vps[1].s.s);
+ vps[2].s.len = strlen(vps[2].s.s);
+ LM_DBG("params[%d] for: %.*s are str: [%.*s] [%.*s]"
+ " [%.*s] [%d]\n", i,
+ fname.len, fname.s, vps[0].s.len, vps[0].s.s,
+ vps[1].s.len, vps[1].s.s, vps[2].s.len, vps[2].s.s, vps[3].n);
} else if(ket->ptypes[0]==SR_KEMIP_STR
&& ket->ptypes[1]==SR_KEMIP_STR
&& ket->ptypes[2]==SR_KEMIP_INT