Hello everyone, is module pua_json going to be implemented for KEMI framework?
I've tried to use KSR.x.modf("pua_json_publish", "json_here") and I'm getting error
def ksr_xhttp_event(self, evmsg, evname):
if evname == "xhttp:request":
try:
KSR.err("===== xhttp module triggered event: " + evname + "\n")
if "/presence" in KSR.pv.get("$hu"):
rb = json.loads(KSR.kx.get_body())
if rb["Event-Package"] == "message-summary":
KSR.info("request received- " + rb["Call-ID"] + "update for: " + rb[
"From"] + "request body: " + json.dumps(rb) + "\n")
KSR.x.modf("pua_json_publish", json.dumps(rb));
KSR.xhttp.xhttp_reply(200, "OK", "text/html", "<html><body>Entity state updated</body></html>")
return 1
if "/RCP" in KSR.pv.get("$hu"):
KSR.jsonrpcs.dispatch()
return 1
else:
KSR.xhttp.xhttp_reply(200, "OK", "text/html", "<html><body>Wrong URL</body></html>")
return 1
except:
KSR.err("===== unsupported " + evname + "\n")
return -255
app_python [python_support.c:154]: python_handle_exception(): apy_exec: ksr_xhttp_event(xhttp:request): Unhandled exception in the Python code:
RuntimeError: self is NULL
kamailio -v
version: kamailio 5.4.5 (x86_64/linux) c46342
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: c46342
compiled on 14:37:00 Apr 27 2021 with gcc 7.5.0
Linux ip-10-199-240-110 4.15.0-1057-aws #59-Ubuntu SMP Wed Dec 4 10:02:00 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.