-
Notifications
You must be signed in to change notification settings - Fork 633
Description
OpenSIPS version you are running
version: opensips 3.3.5 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
main.c compiled on 01:07:59 Apr 20 2023 with gcc 8
Crash Core Dump
https://storage.yandexcloud.net/opensips/core.opensips.987.c0b6e25c82a74300baf5e1d8369b9a8f.3317363.1684915611000000
Describe the traffic that generated the bug
I make call from autodialer to application on mobile device which must register on opensips instance.
When opensips recieve INVITE we send push notification on the user app and subscribe for user registration notification with notify_on_event function to continue call after user has registered.
When mobile user register and answer the call then autodiler send REFER request for transfer called user to another destination.
For handle REFER I use b2b_logic module.
b2b_client_new and b2b_init_request executed in route that specified in notify_on_event.
To Reproduce
My config example
if (isflagset("FLAG_DIALER_SOURCE")) {
remove_hf("Require");
create_dialog();
set_dlg_profile("dialer");
b2b_server_new("caller");
t_newtran();
t_wait_for_new_branches();
$avp(filter) = "aor="+$rU;
notify_on_event("E_UL_CONTACT_INSERT",$avp(filter),"fork_call_dialer", 20);
if (lookup("location")) {
route(RELAY);
}
exit;
}
route[fork_call_dialer] {
xlog("b2b_server_new\n");
#b2b_server_new("caller");
xlog("user $avp(aor) registered a new contact $avp(uri) for dialer call, injecting\n");
b2b_client_new("callee", $avp(uri));
xlog("!!!!!!!!!! b2b_init_request\n");
b2b_init_request("refer");
exit;
}
Relevant System Logs
May 24 14:06:51 /usr/sbin/opensips[3317363]: b2b_server_new
May 24 14:06:51 /usr/sbin/opensips[3317363]: user username registered a new contact sip:username@...:45550;transport=udp for dialer call, injecting
May 24 14:06:51 /usr/sbin/opensips[3317363]: !!!!!!!!!! b2b_init_request
May 24 14:06:51 /usr/sbin/opensips[3317363]: CRITICAL:core:sig_usr: segfault in process pid: 3317363, id: 7
May 24 14:06:51 kernel: opensips[3317363]: segfault at c8 ip 00007f9cac2e9cb8 sp 00007ffc22cd4f40 error 4 in b2b_logic.so[7f9cac2d3000+52000]
May 24 14:06:51 systemd-coredump[3318509]: Process 3317363 (opensips) of user 987 dumped core.#12#012Stack trace of thread 3317363:#12#0 0x00007f9cac2e9cb8 b2bl_insert_new (b2b_logic.so)#12#1 0x00007f9cac30a912 b2b_process_scenario_init (b2b_logic.so)#12#2 0x00007f9cac30c2a2 init_request (b2b_logic.so)#12#3 0x00007f9cac30d1d5 b2b_init_request (b2b_logic.so)#12#4 0x000055907e066462 do_action (opensips)#12#5 0x000055907e069890 run_action_list (opensips)#12#6 0x000055907e069bfd run_top_route (opensips)#12#7 0x00007f9cabe87794 handle_ebr_ipc (event_routing.so)#12#8 0x000055907e0885fd ipc_handle_job (opensips)#12#9 0x000055907e1c5359 io_wait_loop_epoll.constprop.5 (opensips)#12#10 0x000055907e1ca973 udp_start_processes (opensips)#12#11 0x000055907e0366db main (opensips)#12#12 0x00007f9cb6efad85 __libc_start_main (libc.so.6)#12#13 0x000055907e03724e _start (opensips)
May 24 14:06:51 /usr/sbin/opensips[3317356]: INFO:core:handle_sigs: child process 3317363 exited by a signal 11
May 24 14:06:51 /usr/sbin/opensips[3317356]: INFO:core:handle_sigs: core was generated
May 24 14:06:51 /usr/sbin/opensips[3317356]: INFO:core:handle_sigs: terminating due to SIGCHLD
May 24 14:06:51 /usr/sbin/opensips[3317359]: INFO:core:sig_usr: signal 15 received
OS/environment information
-
Operating System: Linux 4.18.0-425.19.2.el8_7.x86_64
-
OpenSIPS installation: packages from http://yum.opensips.org/
Additional context
May be I make something wrong with b2b module. I dont't know.
If there another way how I can handle this scenario and with handling REFER request provide me please