### Description
I migrate one of our old project on native to KEMI on app_python3 and get
strange behavior - after some time kamailio stops processing requests/replies
wit message "ksr_request_route/ksr_reply_route not found or is not callable"
### Troubleshooting
After some research with debug=3 and reading debug logs i found, that some of
routes i forgot to rename in calls t_on_reply() and t_on_failure() - because
they generates "not found or is not callable" in logs too. Also i check all
event routes and found that some event_callbacks point to wrong KEMI functions.
Events of the form (which gave me the idea that it was the wrong names)
DEBUG: 887937087 INVITE app_python3 [python_exec.c:93]: apy_exec():
ksr_onrl_MANAGE not found or is not callable
DEBUG: app_python3 [python_exec.c:93]: apy_exec(): ksr_dialog_event not found
or is not callable
presents in logs very rarely (I saw them only after hours of debugging) even
after restart.
For me its look like that nonexisted routes completly stops interpretator and
block all subsequent processing in the fork and kamailio very rarely has time
to log it.
When i use right names of functions it works well and no
"ksr_request_route/ksr_reply_route not found or is not callable"
PS: KSR.tm.t_on_branch() with wrong route generates normal exception and
nonblock execution
#### Reproduction
Just use wrong names in KSR.tm.t_on_reply()/KSR.tm.t_on_failure() or modparam
event_callback in any module (i got it with dispatcher and dialog)
#### Log Messages
Exception that generates by wrong function in KSR.tm.t_on_branch()
ERROR: 63586697 BYE app_python3 [python_support.c:156]:
python_handle_exception(): apy_exec: ksr_request_route((null)): Unhandled
exception in the Python code:
AttributeError: 'kamailio' object has no attribute 'ksr_br_MANAGE'
The above
exception was the direct cause of the following exception:
Traceback
(most recent call last):
File
"/etc/kamailio@REGION/python/request_route.py", line 38, in ksr_request_route
if
self.ksr_WITHINDLG() == -255:
File
"/etc/kamailio@REGION/python/ksr_WITHINDLG.py", line 27, in ksr_WITHINDLG
return
self.ksr_RELAY()
File
"/etc/kamailio@REGION/python/ksr_RELAY.py", line 17, in ksr_RELAY
if
KSR.tm.t_relay() < 0:
SystemError: <built-in function t_relay> returned a result with an error set
### Possible Solutions
Use rigth names
### Additional Information
version: kamailio 5.7.1 (x86_64/linux) 4238e4
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE,
USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, 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_BLOCKLIST, 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: 4238e4
compiled on 00:00:00 Sep 13 2022 with gcc 11.3.1
version: kamailio 5.6.4 (x86_64/linux)
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_BLOCKLIST, 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: unknown
compiled with gcc 10.2.1
* **Operating System**:
PRETTY_NAME="Oracle Linux Server 9.2"
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3572
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3...@github.com>
_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org