Hello,
I am using Kemi with Python3. I am getting a TypeError exception when
using the following:
KSR.presence.handle_subscribe()
40(208) INFO: PY3 {SUBSCRIBE}: app_python3 [apy_kemi.c:1839]:
sr_apy_kemi_exec_func(): alert - action KSR.presence.handle_subscribe(...)
took too long [2004761 ms] (file:(null) func:(null) line:733)
40(208) ERROR: PY3 {SUBSCRIBE}: app_python3 [python_support.c:156]:
python_handle_exception(): apy_exec: ksr_request_route((null)): Unhandled
exception in the Python code:
TypeError: expected bytes, str found
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/etc/kamailio/kamailio.py", line 152, in ksr_request_route
if self.ksr_route_presence(msg) == -255:
File "/etc/kamailio/kamailio.py", line 733, in ksr_route_presence
KSR.presence.handle_subscribe()
SystemError: <built-in function handle_subscribe> returned a result with an
error set
Using the following appears to be a good workaround, as it does not exhibit
the issue at all:
KSR.presence.handle_subscribe_uri(KSR.pv.get("$fu"))
Cheers,
Michel Pelletier
Show replies by date