The code below causes Kamailio to crash when sending a simple OPTIONS request.
I agree that this is not the most proper way to call the sl function,
but it's probably worth paying attention to this issue.
import KSR as KSR
def mod_init():
return kamailio()
class kamailio:
def __init__(self):
KSR.info('== kamailio init ==\n')
def child_init(self, rank):
return 0
def ksr_request_route(self, msg):
KSR.x.modf("sl_send_reply", "200", "OK");
return 1
(gdb) list
154 in sl_funcs.c
Program received signal SIGSEGV, Segmentation fault.
sl_reply_helper (msg=msg@entry=0x7ffff6fada80, code=200, reason=reason@entry=0x7ffff75d2070 "OK", tag=tag@entry=0x0) at sl_funcs.c:159
159 sl_funcs.c: No such file or directory.
kamailio -v
version: kamailio 6.1.0-dev1 (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, 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_SEND_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 9.4.0
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.