Re: [OpenSIPS-Users] OpenSIPS crash with core dump
Hi Razvan, Can you guide me on how to do that ? which option from "make menuconfig" should I check from compile options. Meanwhile trying to figure out the same for openssl. Will get back to you with these debug symbols in place and core re-read. Regards, Sammy On Tue, May 2, 2017 at 3:22 AM, Răzvan Crainea wrote: > Hi, Sammy! > > Can you install the debugging symbols for both opensips and openssl? After > you install them, inspect the core file again and run a 'bt full' command. > It will help us figure out the stack trace to see what happened. > > Best regards, > > Răzvan Crainea > OpenSIPS Core Developer > http://www.opensips-solutions.com > > On 05/02/2017 02:22 AM, SamyGo wrote: > >> Hi All, >> I've been seeing some crashes in my opensips servers: >> >> >> *_version:_* opensips 2.2.1 (x86_64/linux) >> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, >> F_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_lt, epoll_et, sigio_rt, select. >> main.c compiled on 16:33:09 Jan 12 2017 with gcc 4.8 >> >> *Operatin System:* Ubuntu 14.04.5 LTS >> >> *_Core File:_* >> >> (gdb) bt full >> >> #0 strlen () at ../sysdeps/x86_64/strlen.S:106 >> >> No locals. >> >> #1 0x7f55a8a32f59 in i2d_SSL_SESSION () from >> /lib/x86_64-linux-gnu/libssl.so.1.0.0 >> >> No symbol table info available. >> >> #2 0x7f55a8a07bd5 in ?? () from /lib/x86_64-linux-gnu/libssl.s >> o.1.0.0 >> >> No symbol table info available. >> >> #3 0x7f55a8a08960 in ?? () from /lib/x86_64-linux-gnu/libssl.s >> o.1.0.0 >> >> No symbol table info available. >> >> #4 0x7f55a83f5a7f in ?? () from >> /home/opensips/local/opensips/2_21/lib64/opensips/modules/proto_tls.so >> >> No symbol table info available. >> >> #5 0x7f55a83fe880 in ?? () from >> /home/opensips/local/opensips/2_21/lib64/opensips/modules/proto_tls.so >> >> No symbol table info available. >> >> #6 0x005a372d in ?? () >> >> No symbol table info available. >> >> #7 0x005a4dcb in tcp_worker_proc () >> >> No symbol table info available. >> >> #8 0x0059cbb9 in tcp_start_processes () >> >> No symbol table info available. >> >> #9 0x00419cda in main () >> >> No symbol table info available. >> >> >> >> >> *_Another Crash trace:_* >> >> >> >> (gdb) bt full >> >> #0 0x7fc0abe039da in strtok () at ../sysdeps/x86_64/strtok.S:186 >> >> No locals. >> >> #1 0x0024 in ?? () >> >> No symbol table info available. >> >> #2 0x00020004 in ?? () >> >> No symbol table info available. >> >> #3 0x7ffe32a6f9c0 in ?? () >> >> No symbol table info available. >> >> #4 0x7fbf8baef57c in ?? () >> >> No symbol table info available. >> >> #5 0x00020002 in ?? () >> >> No symbol table info available. >> >> #6 0x7ffe32a6f9d0 in ?? () >> >> No symbol table info available. >> >> #7 0x7fbf8aa8bf00 in ?? () from >> /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 >> >> No symbol table info available. >> >> #8 0x7fbf8b53f000 in ?? () >> >> No symbol table info available. >> >> #9 0x0014 in ?? () >> >> No symbol table info available. >> >> #10 0x in ?? () >> >> No symbol table info available. >> >> (gdb) >> >> >> >> >> >> (gdb) bt full >> >> #0 0x7fe03fc9cc37 in __GI_raise (sig=sig@entry=6) at >> ../nptl/sysdeps/unix/sysv/linux/raise.c:56 >> >> resultvar = 0 >> >> pid = 36112 >> >> selftid = 36112 >> >> #1 0x7fe03fca0028 in __GI_abort () at abort.c:89 >> >> save_stage = 2 >> >> act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = >> 0x0}, sa_mask = {__val = {140596270402586, 8589934592, 64, 3, 33, >> 140596283430288, >> >> 140596283430040, 18446744073709551614, 140596264663692, >> 140596282823192, 3, 33, 140596264116466, 3, 8885408, 1}}, sa_flags = >> 8885408, >> >> sa_restorer = 0x1} >> >> sigs = {__val = {32, 0 }} >> >> #2 0x7fdf1ebfaa62 in ?? () from >> /home/opensips/local/opensips/2_21/lib64/opensips/modules/tls_mgm.so >> >> No symbol table info available. >> >> #3 0x7fdf1e610fcd in CRYPTO_free () from >> /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 >> >> No symbol table info available. >> >> #4 0x7fdf1e9c8c16 in SSL_SESSION_free () from >> /lib/x86_64-linux-gnu/libssl.so.1.0.0 >> >> No symbol table info available. >> >> #5 0x7fdf1e9c6f5d in SSL_free () from >> /lib/x86_64-linux-gnu/libssl.so.1.0.0 >> >> No symbol table info available. >> >> #6 0x7fdf1e38a327 in ?? () from >> /home/opensips/local/opensips/2_21/lib64/opensips/modules/proto_tls.so >> >> No symbol table info available. >> >> #7 0x00593114 in ?? () >> >> No symbol table info available. >> >> #8 0x005933b0 in ?? () >> >> No symbol table info available. >> >> #9 0x004147f4 in ?? () >> >> No symbol table info available. >> >> #10 0x004154
Re: [OpenSIPS-Users] TLS SIP packet tracing and visualization
For a cut and paste ready version, that has the correct carriage returns (mangled by mail), check it in FreeSWITCH documentation: https://freeswitch.org/confluence/display/FREESWITCH/Packet+Capture#PacketCapture-TLSwithsharka -giovanni On 2 May 2017 at 16:26, Giovanni Maruzzelli wrote: > Hello fellows, > > after some experimentation with various tools, I come out with a little > shell tool that maybe can be useful to you too. > > It can only work with non-forward secrecy ciphers, obviously, and only if > is started before the client do the initial TLS handshake (eg, just restart > the client). Forward secrecy cannot be decrypted after fact, so don't waste > effort. > > An example of ciphers that can be decrypted are the "AES256-SHA" openssl > cipher group. You can use ssldump to check what cipher is used by > serverhello. > > Enjoy, make it better, and share it :) > > > #!/bin/bash > # brought to you by Giovanni Maruzzelli > # > SERVERIP="192.168.1.150" > SERVERPORT="5061" > PRIVKEY="/etc/certs/privkey.pem" > STDERR2DEVNULL=" 2>/dev/null " > REGEX="notyet" > > if [ -z "$1" ]; then > REGEX="\\\.*" > else > REGEX="$1" > fi > FILTER="ssl.app_data and sip matches" > FILTER2="$FILTER \"$REGEX\"" > FILTER3="'$FILTER2'" > ARGUMENT="-i 1 -Y $FILTER3 -E header=y -T fields -e frame.number -e > frame.time -e frame.time_delta_displayed -e ip.src -e ip.dst -e > sip.Status-Line -e sip.Request-Line -e sip.msg_hdr -l -d > tcp.port\=\=5061,sip -o \"ssl.keys_list: $SERVERIP,$SERVERPORT,sip,$PRIVKEY\" > $STDERR2DEVNULL | sed -u 's/\t/\n/g' | sed -u '/^$/d' | sed -u > 's/^[0-9]*$/\n==&==/g'" > > echo "" > echo "NB: if it do not works, edit script so that STDERR2DEVNULL=\" \" and > try again" > echo "" > echo "NB: remember to quote and escape match patterns, using triple slash" > echo "eg, for matching 1...@pbx.example.com, use \" > 1...@pbx.example.com\"" > echo "eg, for matching anything, use \"\\.*\"" > echo "eg, for matching *98, use \"\\*98\"" > echo "USAGE: $0 \"\\*9...@pbx.example.com\"" > echo "" > > > case "$1" in > -help|--help|?) > exit 0 > ;; > *) > echo "THIS TIME WE'RE DOING:" > echo "tshark $ARGUMENT" > echo "" > bash -c "tshark $ARGUMENT" > ;; > esac > > > > -- > > Sincerely, > > Giovanni Maruzzelli > OpenTelecom.IT > cell: +39 347 266 56 18 > -- Sincerely, Giovanni Maruzzelli OpenTelecom.IT cell: +39 347 266 56 18 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] TLS SIP packet tracing and visualization
Hello fellows, after some experimentation with various tools, I come out with a little shell tool that maybe can be useful to you too. It can only work with non-forward secrecy ciphers, obviously, and only if is started before the client do the initial TLS handshake (eg, just restart the client). Forward secrecy cannot be decrypted after fact, so don't waste effort. An example of ciphers that can be decrypted are the "AES256-SHA" openssl cipher group. You can use ssldump to check what cipher is used by serverhello. Enjoy, make it better, and share it :) #!/bin/bash # brought to you by Giovanni Maruzzelli # SERVERIP="192.168.1.150" SERVERPORT="5061" PRIVKEY="/etc/certs/privkey.pem" STDERR2DEVNULL=" 2>/dev/null " REGEX="notyet" if [ -z "$1" ]; then REGEX="\\\.*" else REGEX="$1" fi FILTER="ssl.app_data and sip matches" FILTER2="$FILTER \"$REGEX\"" FILTER3="'$FILTER2'" ARGUMENT="-i 1 -Y $FILTER3 -E header=y -T fields -e frame.number -e frame.time -e frame.time_delta_displayed -e ip.src -e ip.dst -e sip.Status-Line -e sip.Request-Line -e sip.msg_hdr -l -d tcp.port\=\=5061,sip -o \"ssl.keys_list: $SERVERIP,$SERVERPORT,sip,$PRIVKEY\" $STDERR2DEVNULL | sed -u 's/\t/\n/g' | sed -u '/^$/d' | sed -u 's/^[0-9]*$/\n==&==/g'" echo "" echo "NB: if it do not works, edit script so that STDERR2DEVNULL=\" \" and try again" echo "" echo "NB: remember to quote and escape match patterns, using triple slash" echo "eg, for matching 1...@pbx.example.com, use \"1...@pbx.example.com \"" echo "eg, for matching anything, use \"\\.*\"" echo "eg, for matching *98, use \"\\*98\"" echo "USAGE: $0 \"\\*9...@pbx.example.com\"" echo "" case "$1" in -help|--help|?) exit 0 ;; *) echo "THIS TIME WE'RE DOING:" echo "tshark $ARGUMENT" echo "" bash -c "tshark $ARGUMENT" ;; esac -- Sincerely, Giovanni Maruzzelli OpenTelecom.IT cell: +39 347 266 56 18 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] 408 timeout
Hello Everyone, Thank you for help. On Mon, 1 May, 2017 at 5:49 AM, Bogdan-Andrei Iancu wrote: Hi, The failure route is correct and you have to arm it before sending out the request via the request route (before the t_relay()) with t_on_failure("MANAGE_FAILURE") Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com OpenSIPS Summit May 2017 Amsterdam http://www.opensips.org/events/Summit-2017Amsterdam.html On 05/01/2017 04:22 AM, volga...@networklab.ca wrote: Hello Bogdan, I created fail route failure_route[MANAGE_FAILURE] { if (t_check_status("408")) { append_branch(); route(DISPATCH); } if (t_was_cancelled()) { exit; } } How I can detect that timer expire ? On which stage in reply need apply fail route. volga629 On Sun, 30 Apr, 2017 at 8:44 AM, Bogdan-Andrei Iancu wrote: Hi, OpenSIPS is generating the CANCEL due to the timeout (no answer to the call) - see: http://www.opensips.org/html/docs/modules/2.2.x/tm.html#fr_inv_timeout If you want to get a redirect to a VM, you need to use the failure route in order to catch the 408 reply and create a new branch to the VM server. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com OpenSIPS Summit May 2017 Amsterdam http://www.opensips.org/events/Summit-2017Amsterdam.html On 04/29/2017 06:28 AM, volga...@networklab.ca wrote: Hello Alex, So what it is 2017/04/28 22:12:45.455111 server_public_ip:5082 -> client_public_ip:47293 SIP/2.0 180 Ringing Via: SIP/2.0/TCP 192.168.88.164:45248;received=client_public_ip;branch=z9hG4bK-524287-1---d06c254812b2384a;rport=47293 Record-Route: Record-Route: From: "volga629" ;tag=f30d187f To: ;tag=ZH2mc6gFgS9Fg Call-ID: 141351_rel51ZmI1MWU2ZTFkN2Y5NDUzN2M0YTYyMThiYTY0NmZjYzI CSeq: 2 INVITE Contact: User-Agent: B2BUA01 Accept: application/sdp Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, NOTIFY, PUBLISH, SUBSCRIBE Supported: timer, path, replaces Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer Content-Length: 0 OPENSIPS send to PBX 2017/04/28 22:13:14.639461 10.18.130.27:5060 -> 10.18.130.26:5160 CANCEL sip:4...@sip.company.tld SIP/2.0 Via: SIP/2.0/UDP 10.18.130.27:5060;branch=z9hG4bKeffd.f2504821.0 From: "volga629";tag=f30d187f Call-ID: 141351_rel51ZmI1MWU2ZTFkN2Y5NDUzN2M0YTYyMThiYTY0NmZjYzI To: CSeq: 2 CANCEL Max-Forwards: 70 Reason: SIP;cause=480;text="NO_ANSWER" User-Agent: OpenSIPS (2.4.0-dev (x86_64/linux)) Content-Length: 0 2017/04/28 22:13:14.639605 server_public_ip:5082 -> client_public_ip:47293 SIP/2.0 408 Request Timeout Via: SIP/2.0/TCP 192.168.88.164:45248;received=client_public_ip;branch=z9hG4bK-524287-1---d06c254812b2384a;rport=47293 To: ;tag=c88f800b416e86b8a763b24c260500d8-3c4f From: "volga629";tag=f30d187f Call-ID: 141351_rel51ZmI1MWU2ZTFkN2Y5NDUzN2M0YTYyMThiYTY0NmZjYzI CSeq: 2 INVITE Server: OpenSIPS (2.4.0-dev (x86_64/linux)) Content-Length: 0 On Fri, 28 Apr, 2017 at 11:33 PM, Alex Balashov wrote: OpenSIPS didn't hang up anything. On April 28, 2017 10:30:08 PM EDT, volga...@networklab.ca wrote: Hello Everyone, Why opensips hang up session with 408 on SIP;cause=480;text="NO_ANSWER". I expected b2bua will send to voicemail. What way possible fix it. Please see attached trace. volga629 -- Alex -- Principal, Evariste Systems LLC (www.evaristesys.com) Sent from my Google Nexus. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] OpenSIPS crash with core dump
Hi, Sammy! Can you install the debugging symbols for both opensips and openssl? After you install them, inspect the core file again and run a 'bt full' command. It will help us figure out the stack trace to see what happened. Best regards, Răzvan Crainea OpenSIPS Core Developer http://www.opensips-solutions.com On 05/02/2017 02:22 AM, SamyGo wrote: Hi All, I've been seeing some crashes in my opensips servers: *_version:_* opensips 2.2.1 (x86_64/linux) flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_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_lt, epoll_et, sigio_rt, select. main.c compiled on 16:33:09 Jan 12 2017 with gcc 4.8 *Operatin System:* Ubuntu 14.04.5 LTS *_Core File:_* (gdb) bt full #0 strlen () at ../sysdeps/x86_64/strlen.S:106 No locals. #1 0x7f55a8a32f59 in i2d_SSL_SESSION () from /lib/x86_64-linux-gnu/libssl.so.1.0.0 No symbol table info available. #2 0x7f55a8a07bd5 in ?? () from /lib/x86_64-linux-gnu/libssl.so.1.0.0 No symbol table info available. #3 0x7f55a8a08960 in ?? () from /lib/x86_64-linux-gnu/libssl.so.1.0.0 No symbol table info available. #4 0x7f55a83f5a7f in ?? () from /home/opensips/local/opensips/2_21/lib64/opensips/modules/proto_tls.so No symbol table info available. #5 0x7f55a83fe880 in ?? () from /home/opensips/local/opensips/2_21/lib64/opensips/modules/proto_tls.so No symbol table info available. #6 0x005a372d in ?? () No symbol table info available. #7 0x005a4dcb in tcp_worker_proc () No symbol table info available. #8 0x0059cbb9 in tcp_start_processes () No symbol table info available. #9 0x00419cda in main () No symbol table info available. *_Another Crash trace:_* (gdb) bt full #0 0x7fc0abe039da in strtok () at ../sysdeps/x86_64/strtok.S:186 No locals. #1 0x0024 in ?? () No symbol table info available. #2 0x00020004 in ?? () No symbol table info available. #3 0x7ffe32a6f9c0 in ?? () No symbol table info available. #4 0x7fbf8baef57c in ?? () No symbol table info available. #5 0x00020002 in ?? () No symbol table info available. #6 0x7ffe32a6f9d0 in ?? () No symbol table info available. #7 0x7fbf8aa8bf00 in ?? () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 No symbol table info available. #8 0x7fbf8b53f000 in ?? () No symbol table info available. #9 0x0014 in ?? () No symbol table info available. #10 0x in ?? () No symbol table info available. (gdb) (gdb) bt full #0 0x7fe03fc9cc37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 resultvar = 0 pid = 36112 selftid = 36112 #1 0x7fe03fca0028 in __GI_abort () at abort.c:89 save_stage = 2 act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {140596270402586, 8589934592, 64, 3, 33, 140596283430288, 140596283430040, 18446744073709551614, 140596264663692, 140596282823192, 3, 33, 140596264116466, 3, 8885408, 1}}, sa_flags = 8885408, sa_restorer = 0x1} sigs = {__val = {32, 0 }} #2 0x7fdf1ebfaa62 in ?? () from /home/opensips/local/opensips/2_21/lib64/opensips/modules/tls_mgm.so No symbol table info available. #3 0x7fdf1e610fcd in CRYPTO_free () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 No symbol table info available. #4 0x7fdf1e9c8c16 in SSL_SESSION_free () from /lib/x86_64-linux-gnu/libssl.so.1.0.0 No symbol table info available. #5 0x7fdf1e9c6f5d in SSL_free () from /lib/x86_64-linux-gnu/libssl.so.1.0.0 No symbol table info available. #6 0x7fdf1e38a327 in ?? () from /home/opensips/local/opensips/2_21/lib64/opensips/modules/proto_tls.so No symbol table info available. #7 0x00593114 in ?? () No symbol table info available. #8 0x005933b0 in ?? () No symbol table info available. #9 0x004147f4 in ?? () No symbol table info available. #10 0x004154db in ?? () No symbol table info available. #11 0x0059d087 in tcp_start_processes () No symbol table info available. #12 0x00419cda in main () No symbol table info available. (gdb) bt full #0 0x7fe03fc9cc37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 resultvar = 0 pid = 35939 selftid = 35939 #1 0x7fe03fca0028 in __GI_abort () at abort.c:89 save_stage = 2 act = {__sigaction_handler = {sa_handler = 0x1, sa_sigaction = 0x1}, sa_mask = {__val = {0, 140596279116408, 140601127703847, 1, 0, 6087545, 140601119395120, 0, 140596279116408, 8739288, 140601127732437, 1, 140601120396285, 0, 0, 140601123293024}}, sa_flags = 0, sa_restorer = 0x0} sigs = {__val = {32, 0 }} #2 0x000