Module: kamailio
Branch: 5.2
Commit: c4018e1bba7c84274c9bfa1d2380d39232e1de46
URL:
https://github.com/kamailio/kamailio/commit/c4018e1bba7c84274c9bfa1d2380d39…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-05-03T09:15:10+02:00
app_python3: handle kemi sssi parameters
(cherry picked from commit 6bc7853a114fb000744cba3a43f346f71e640452)
---
Modified: src/modules/app_python3/apy_kemi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c4018e1bba7c84274c9bfa1d2380d39…
Patch:
https://github.com/kamailio/kamailio/commit/c4018e1bba7c84274c9bfa1d2380d39…
---
diff --git a/src/modules/app_python3/apy_kemi.c b/src/modules/app_python3/apy_kemi.c
index 0b78c29107..cee8e6037f 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