sr-dev
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
November 2023
- 15 participants
- 403 discussions
[kamailio/kamailio] Dialog DMQ sync: Timer needs fixing, firing on wrong node! (Issue #3656)
by Benoît Panizzon 17 Jul '24
by Benoît Panizzon 17 Jul '24
17 Jul '24
Situation: Two Kamailio nodes syncing dialog profiles via DMQ
Observation: When a dialog timeout is encountered, about half of the time, the timeout is triggered on the peer node not handling the dialog preventing the call to be correctly terminated and also leaving entries in the dialog database which never get deleted.
https://kamailio.org/docs/modules/5.7.x/modules/dialog.html#dialog.p.enable…
Makes clear, that only the node which is handling the dialog in question, can make changes not related to the dialog profiles. So when a dialog times out, it is this node which has to trigger the timeout, not any other one.
When looking at the source code, it is clear, that the 'lifetime' is transmitted via DMQ dialog message to the peer nodes, which in turn arm a timer. So it is obvious, this time will trigger, sometimes before the instance handling the dialog itself triggers that timer.
With some assistance of @oej I found a way to alter the JSON payload to extend the lifetime on the peer nodes:
```
route[DMQ_CAPTURE]
{
if(is_method("KDMQ"))
{
if(has_body("application/json") && $fU == 'dialog')
{
if (jansson_get("lifetime", $rb, "$var(lifetime)"))
{
$var(new_lifetime) = $var(lifetime) + 60; # Add 60 seconds on DMQ peer to make sure it expires AFTER main node.
$var(newrb) = $rb;
jansson_set("integer", "lifetime", $var(new_lifetime), "$var(newrb)");
set_body("$var(newrb)","application/json");
msg_apply_changes();
}
}
dmq_handle_message();
exit;
}
}
```
Testing with this config fixed the issue of the timeout firing on a peer node instead of the node handling the dialog.
Issue is present in 5.5, 5.6 and after looking at the code, I assume also on 5.7
-Benoît
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3656
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3656(a)github.com>
6
15
Hi,
I think there is an issue with writing CDRs on failover scenarios.
I have two servers with Kamailio. Both server running Debian 11 (bulleye) and latest Kamailio 5.6.1 from git.
I'm using DMQ to sync dialogs and htable between these servers, so both servers have the same knowledge of dialog state. Both Kamailio uses nobind option, so I can switch a VIP from one server to the other one. This is managed with keepalived. Switching the VIP from one server the other one works fine an while a call is running I can switch the VIP. I can see that the BYE Message is handled OK after I made a switch. I can see that acc is triggered but what is missing is acc_cdr in this case.
I'm using htable to fill all necessary variables to complete the CDR an I can see that all values are synced correctly.
The acc_cdr is created fine if there is no failover so i think it can't be an configuration issue.
Both server holds the same Kamailio configuration except the IP.
`version: kamailio 5.6.1 (x86_64/linux) bfc5c2-dirty
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: bfc5c2 -dirty
compiled with gcc 10.2.1`
`root@voip-lab-proxy01:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye`
`root@voip-lab-proxy01:~# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 38 bits physical, 48 bits virtual
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 23
Model name: Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
Stepping: 10
CPU MHz: 2500.088
BogoMIPS: 5000.17
Virtualization: VT-x
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 128 KiB
L1i cache: 128 KiB
L2 cache: 16 MiB
L3 cache: 16 MiB
NUMA node0 CPU(s): 0-3
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Mitigation; PTE Inversion; VMX EPT disabled
Vulnerability Mds: Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Mmio stale data: Unknown: No mitigations
Vulnerability Retbleed: Not affected
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Retpolines, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid
tsc_known_freq pni vmx ssse3 cx16 pdcm sse4_1 x2apic tsc_deadline_timer xsave hypervisor lahf_lm cpuid_fault pti tpr_shadow vnmi flexpriority vpid tsc_adjust arat arch_capabilit
ies`
If you need more information, please let me know. As I'm running this on a test system I can reproduce the issue at any time.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3254
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3254(a)github.com>
5
9
[kamailio/kamailio] WIP pkg: RPM packaging add kamailio-tls_wolfssl subpackage (PR #3592)
by space88man 09 Jul '24
by space88man 09 Jul '24
09 Jul '24
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [X] Commit message has the format required by CONTRIBUTING guide
- [X] Commits are split per component (core, individual modules, libs, utils, ...)
- [X] Each component has a single commit (if not, squash them into one commit)
- [X] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [X] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
Not for merging yet.
Package tls_wolfssl as an alternative to OpenSSL 3.x.
Depends on PR https://github.com/kamailio/kamailio/pull/3590
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3592
-- Commit Summary --
* pkg: RPM packaging add kamailio-tls_wolfssl subpackage
-- File Changes --
M pkg/kamailio/obs/kamailio.spec (18)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3592.patch
https://github.com/kamailio/kamailio/pull/3592.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3592
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3592(a)github.com>
5
27
27 Jun '24
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
Hi, I ran into an issue where the Kamailio service seemingly froze (didn't crash, but failed to receive and deliver calls) while running, I went through the logs a little bit, and saw the same log pattern (pasted below) recouring every few months or so, on an older installation (5.2.0). Usually, it ended up automatically restarting the service. But not this time, I had to reload it manually to make the service work again.
Is this a known issue?
How can I make sure that the service will be able to restart the next time it happens?
Edward
### Troubleshooting
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/sbin/kamailio...done.
warning: exec file is newer than core file.
[New LWP 11413]
Core was generated by `kamailio'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f4e4a52e428 in ?? ()
(gdb) Quit
(gdb) bt full
#0 0x00007f4e4a52e428 in ?? ()
No symbol table info available.
#1 0x00007f4e4a53002a in ?? ()
No symbol table info available.
#2 0x0000000000000020 in ?? ()
No symbol table info available.
#3 0x0000000000000000 in ?? ()
No symbol table info available.
(gdb) info locals
No symbol table info available.
(gdb) list
1871 & now if we don't need it */
1872 #ifdef USE_SLOW_TIMER
1873 + 1 /* slow timer process */
1874 #endif
1875 #ifdef USE_TCP
1876 +((!tcp_disable)?( 1/* tcp main */ + tcp_listeners ):0)
1877 #endif
1878 #ifdef USE_SCTP
1879 +((!sctp_disable)?sctp_listeners:0)
1880 #endif
(gdb)
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
Jun 28 16:35:22 kamprodegres kamailio: INFO: <core> [core/sctp_core.c:74]: sctp_core_check_support(): SCTP API not enabled - if you want to use it, load sctp module
Jun 28 16:35:22 kamprodegres kamailio: WARNING: <core> [core/socket_info.c:1394]: fix_hostname(): could not rev. resolve 70.36.25.87
Jun 28 16:35:22 kamprodegres kamailio: WARNING: <core> [core/socket_info.c:1394]: fix_hostname(): could not rev. resolve 70.36.25.87
Jun 28 16:35:22 kamprodegres kamailio: INFO: <core> [core/tcp_main.c:5042]: init_tcp(): using epoll_lt as the io watch method (auto detected)
Jun 28 16:35:22 kamprodegres kamailio[8489]: INFO: jsonrpcs [jsonrpcs_sock.c:197]: jsonrpc_dgram_mod_init(): the socket /var/run/kamailio/kamailio_rpc.sock already exists, trying to delete it...
Jun 28 16:35:22 kamprodegres kamailio[8489]: INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module is not loaded
Jun 28 16:35:22 kamprodegres kamailio[8489]: INFO: rr [rr_mod.c:177]: mod_init(): outbound module not available
Jun 28 16:35:22 kamprodegres kamailio[8489]: INFO: <core> [main.c:2779]: main(): processes (at least): 40 - shm size: 67108864 - pkg size: 8388608
Jun 28 16:35:22 kamprodegres kamailio[8489]: INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992
Jun 28 16:35:22 kamprodegres kamailio[8489]: INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984
Jun 28 16:35:22 kamprodegres kamailio[8489]: INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992
Jun 28 16:35:22 kamprodegres kamailio[8489]: INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984
Jun 28 16:35:22 kamprodegres kamailio[8489]: INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992
Jun 28 16:35:22 kamprodegres kamailio[8489]: INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984
Jun 28 16:35:22 kamprodegres kamailio[8518]: INFO: jsonrpcs [jsonrpcs_sock.c:443]: jsonrpc_dgram_process(): a new child 0/8518
Jun 28 16:35:22 kamprodegres kamailio[8519]: INFO: ctl [io_listener.c:214]: io_listen_loop(): io_listen_loop: using epoll_lt io watch method (config)
Jun 29 18:13:37 kamprodegres kamailio[8513]: INFO: {1 581461 CANCEL 402954192_49936786(a)67.231.13.146} tm [t_reply.c:478]: _reply_light(): can't generate 487 reply when a final 404 was sent out
Jun 29 18:27:00 kamprodegres kamailio[8508]: INFO: {1 211236 CANCEL 405019408_127896329(a)67.231.13.146} tm [t_reply.c:478]: _reply_light(): can't generate 487 reply when a final 404 was sent out
Jun 29 18:51:10 kamprodegres /usr/local/sbin/kamailio[2269]: NOTICE: <core> [main.c:725]: handle_sigs(): Thank you for flying kamailio!!!
Jun 29 18:51:10 kamprodegres /usr/local/sbin/kamailio[2326]: INFO: <core> [main.c:847]: sig_usr(): signal 15 received
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.3.2 (x86_64/linux) 7ba545
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_BLACKLIST, HAVE_RESOLV_RES
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: 7ba545
compiled on 16:37:32 Jun 14 2020 with gcc 5.4.0
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
Ubuntu 16.04
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2380
3
10
[kamailio/kamailio] microhttpd cannot be build on CentOS 8 (Issue #3504)
by sergey-safarov 08 Jun '24
by sergey-safarov 08 Jun '24
08 Jun '24
```
LD (gcc) [M memcached.so] memcached.so
CC (gcc) [M microhttpd.so] microhttpd_mod.o
microhttpd_mod.c:374:24: error: return type is an incomplete type
static enum MHD_Result ksr_microhttpd_request(void *cls,
^~~~~~~~~~~~~~~~~~~~~~
microhttpd_mod.c: In function 'ksr_microhttpd_request':
microhttpd_mod.c:390:10: warning: 'return' with a value, in function returning void
return MHD_YES;
^~~~~~~
microhttpd_mod.c:374:24: note: declared here
static enum MHD_Result ksr_microhttpd_request(void *cls,
^~~~~~~~~~~~~~~~~~~~~~
microhttpd_mod.c:411:10: warning: 'return' with a value, in function returning void
return MHD_NO;
^~~~~~
microhttpd_mod.c:374:24: note: declared here
static enum MHD_Result ksr_microhttpd_request(void *cls,
^~~~~~~~~~~~~~~~~~~~~~
microhttpd_mod.c:433:10: warning: 'return' with a value, in function returning void
return MHD_NO;
^~~~~~
microhttpd_mod.c:374:24: note: declared here
static enum MHD_Result ksr_microhttpd_request(void *cls,
^~~~~~~~~~~~~~~~~~~~~~
microhttpd_mod.c:436:9: warning: 'return' with a value, in function returning void
return MHD_YES;
^~~~~~~
microhttpd_mod.c:374:24: note: declared here
static enum MHD_Result ksr_microhttpd_request(void *cls,
^~~~~~~~~~~~~~~~~~~~~~
microhttpd_mod.c: In function 'microhttpd_server_run':
microhttpd_mod.c:462:17: warning: passing argument 5 of 'MHD_start_daemon' from incompatible pointer type [-Wincompatible-p
ointer-types]
NULL, NULL, &ksr_microhttpd_request, KSR_MICROHTTPD_PAGE,
^~~~~~~~~~~~~~~~~~~~~~~
In file included from microhttpd_mod.c:29:
/usr/include/microhttpd.h:2148:1: note: expected 'MHD_AccessHandlerCallback' {aka 'int (*)(void *, struct MHD_Connection *,
const char *, const char *, const char *, const char *, long unsigned int *, void **)'} but argument is of type 'void (*)(
void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)' {aka 'void (*)
(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)'}
MHD_start_daemon (unsigned int flags,
^~~~~~~~~~~~~~~~
microhttpd_mod.c:467:17: warning: passing argument 5 of 'MHD_start_daemon' from incompatible pointer type [-Wincompatible-p
ointer-types]
NULL, NULL, &ksr_microhttpd_request, KSR_MICROHTTPD_PAGE,
^~~~~~~~~~~~~~~~~~~~~~~
In file included from microhttpd_mod.c:29:
/usr/include/microhttpd.h:2148:1: note: expected 'MHD_AccessHandlerCallback' {aka 'int (*)(void *, struct MHD_Connection *,
const char *, const char *, const char *, const char *, long unsigned int *, void **)'} but argument is of type 'void (*)(
void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)' {aka 'void (*)
(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)'}
MHD_start_daemon (unsigned int flags,
^~~~~~~~~~~~~~~~
make[2]: *** [../../Makefile.rules:100: microhttpd_mod.o] Error 1
make[1]: Leaving directory '/root/rpmbuild/BUILD/kamailio-5.8.0-dev1/src'
make[1]: *** [Makefile:508: modules] Error 1
make: *** [Makefile:34: every-module] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.K7wkd7 (%build)
Bad exit status from /var/tmp/rpm-tmp.K7wkd7 (%build)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3504
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3504(a)github.com>
3
3
[kamailio/kamailio] Crash in dns_cache.c with use_dns_cache=off (Issue #3350)
by Дилян Палаузов 04 Jun '24
by Дилян Палаузов 04 Jun '24
04 Jun '24
With Kamailio 5.6.3 I add this code
```diff
-- Routing to foreign domains
function ksr_route_sipout()
+ local y = KSR.enum.enum_query()
+ KSR.err('ENUM RESULT ' .. tostring(y) .. ' :RURI ' .. KSR.kx.get_ruri() .. '\n')
if KSR.is_myself_ruri() then return 1; end
KSR.hdr.append("P-Hint: outbound\r\n");
```
and dial +437200101011 . The code above produces the output “ENUM RESULT 1 :RURI sip:enum-test@sip.nemox.net”.
I have the DNS-related settings:
```
dns_try_naptr=on
use_dns_cache=off
dns_cache_init=off
```
Kamailio logs during the dial-in process:
```sip
INVITE sip:+437200101011@sip.example.org SIP/2.0
Via: SIP/2.0/UDP 192.168.0.199:40867;rport;branch=z9hG4bKU2Fc14H2NX4Kc
Max-Forwards: 70
From: <sip:myself@sip.example.org>;tag=vmjX7H12KrH1B
To: <sip:+437200101011@sip.example.org>
Call-ID: 8956e785-1905-123c-24bb-e4aaeae9dd8b
CSeq: 62865320 INVITE
Contact: <sip:myself@sip.example.org>
User-Agent: calls sofia-sip/1.13.12
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE
Supported: timer, 100rel, replaces, gruu, outbound
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 240
v=0
o=- 9163509233734166984 5909793187606445082 IN IP4 192.168.0.199
s=-
c=IN IP4 22.222.222.222
t=0 0
m=audio 43264 RTP/AVP 9 8 0 3
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtcp:33730
6(7) ERROR: <core> [core/kemi.c:96]: sr_kemi_core_err(): ksr_sipdump_event 1--------- sipdump:msg
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 192.168.0.199:40867;rport=40867;branch=z9hG4bKU2Fc14H2NX4Kc;received=22.222.222.222
From: <sip:myself@sip.example.org>;tag=vmjX7H12KrH1B
To: <sip:+437200101011@sip.example.org>;tag=44af9dbde0a62ae84f5c1ff272adb901.20dd651d
Call-ID: 8956e785-1905-123c-24bb-e4aaeae9dd8b
CSeq: 62865320 INVITE
Proxy-Authenticate: Digest realm="example.int", nonce="Y9QB/GPUANBJum6LTOLsDnjaSLKc/8o1A1zk1oUtFXzlFe/OfiMEAg=="
Content-Length: 0
8(9) ERROR: <core> [core/kemi.c:96]: sr_kemi_core_err(): ksr_sipdump_event 1--------- sipdump:msg
ACK sip:+437200101011@sip.example.org SIP/2.0
Via: SIP/2.0/UDP 192.168.0.199:40867;rport;branch=z9hG4bKU2Fc14H2NX4Kc
Max-Forwards: 70
From: <sip:myself@sip.example.org>;tag=vmjX7H12KrH1B
To: <sip:+437200101011@sip.example.org>;tag=44af9dbde0a62ae84f5c1ff272adb901.20dd651d
Call-ID: 8956e785-1905-123c-24bb-e4aaeae9dd8b
CSeq: 62865320 ACK
Content-Length: 0
5(6) ERROR: <core> [core/kemi.c:96]: sr_kemi_core_err(): ksr_sipdump_event 1--------- sipdump:msg
INVITE sip:+437200101011@sip.example.org SIP/2.0
Via: SIP/2.0/UDP 192.168.0.199:40867;rport;branch=z9hG4bKvB942Z25j6t6Q
Max-Forwards: 70
From: <sip:myself@sip.example.org>;tag=vmjX7H12KrH1B
To: <sip:+437200101011@sip.example.org>
Call-ID: 8956e785-1905-123c-24bb-e4aaeae9dd8b
CSeq: 62865321 INVITE
Contact: <sip:myself@sip.example.org>
User-Agent: calls sofia-sip/1.13.12
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE
Supported: timer, 100rel, replaces, gruu, outbound
Proxy-Authorization: Digest username="myself", realm="example.int", nonce="Y9QB/GPUANBJum6LTOLsDnjaSLKc/8o1A1zk1oUtFXzlFe/OfiMEAg==", algorithm=MD5, uri="sip:+437200101011@sip.example.org", response="da2f40487bb63329105222dab911d9bd"
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 240
v=0
o=- 9163509233734166984 5909793187606445082 IN IP4 192.168.0.199
s=-
c=IN IP4 22.222.222.222
t=0 0
m=audio 43264 RTP/AVP 9 8 0 3
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtcp:33730
5(6) ERROR: <core> [core/kemi.c:96]: sr_kemi_core_err(): ENUM RESULT 1 :RURI sip:enum-test@sip.nemox.net
5(6) ERROR: <core> [core/kemi.c:96]: sr_kemi_core_err(): ksr_sipdump_event 1--------- sipdump:msg
SIP/2.0 100 trying -- your call is important to us
Via: SIP/2.0/UDP 192.168.0.199:40867;rport=40867;branch=z9hG4bKvB942Z25j6t6Q;received=22.222.222.222
From: <sip:myself@sip.example.org>;tag=vmjX7H12KrH1B
To: <sip:+437200101011@sip.example.org>
Call-ID: 8956e785-1905-123c-24bb-e4aaeae9dd8b
CSeq: 62865321 INVITE
Authentication-Info: nextnonce="Y9QB/GPUANBJum6LTOLsDnjaSLKc/8o1A1zk1oUtFXzlFe/OfiMEAg==", qop=, rspauth="d9dd065ba472cbc3f8cc4505dbd2ad60", cnonce="", nc=
Content-Length: 0
0(1) ALERT: <core> [main.c:774]: handle_sigs(): child process 6 exited by a signal 11
24(25) CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 13
0(1) ALERT: <core> [main.c:777]: handle_sigs(): core was generated
```
The full backtrace is:
```
#0 0x00000000004867e5 in atomic_cmpxchg_int (var=0x0, old=0, new_v=1) at core/mem/../atomic/atomic_x86.h:224
ret = 32663
#1 0x0000000000486831 in futex_get (lock=0x0) at core/mem/../futexlock.h:99
v = 0
i = 1024
#2 0x0000000000490ce5 in dns_hash_get (name=0x7ffe2446dbc0, type=33, h=0x7ffe2446da90, err=0x7ffe2446da7c) at core/dns_cache.c:673
e = 0x0
#3 0x00000000004972a7 in dns_get_entry (name=0x7ffe2446dbc0, type=33) at core/dns_cache.c:2001
h = 608623712
e = 0x0
cname_val = {
s = 0x0,
len = 5860299
}
err = 32766
rec_cnt = 1
__func__ = "dns_get_entry"
#4 0x0000000000499289 in dns_srv_get_he (name=0x7ffe2446dbc0, port=0x7ffe2446df1c, flags=0) at core/dns_cache.c:2455
e = 0x2
rr = 0x0
rr_name = {
s = 0xa3e33d203 <error: Cannot access memory at address 0xa3e33d203>,
len = 1043567768
}
he = 0x0
now = 611930531
rr_no = 0 '\000'
#5 0x0000000000597aae in no_naptr_srv_sip_resolvehost (name=0x7ffe2446e100, port=0x7ffe2446df1c, proto=0x7f973a751788 "\001") at core/resolve.c:1599
srv_proto_list = {{
proto = 1 '\001',
proto_pref = 30
}, {
proto = 2 '\002',
proto_pref = 20
}, {
proto = 4 '\004',
proto_pref = 20
}, {
proto = 3 '\003',
proto_pref = 10
}, {
proto = 0 '\000',
proto_pref = 0
}, {
proto = 13 '\r',
proto_pref = 1
}, {
proto = 80 'P',
proto_pref = 319
}}
he = 0x0
ip = 0x0
srv_name = {
s = 0x929320 <tmp_srv> "_sip._udp.sip.nemox.net",
len = 23
}
tmp_srv = "_sip._udp.sip.nemox.net", '\000' <repeats 232 times>
i = 0
list_len = 4
__func__ = "no_naptr_srv_sip_resolvehost"
#6 0x0000000000598333 in naptr_sip_resolvehost (name=0x7ffe2446e100, port=0x7ffe2446df1c, proto=0x7f973a751788 "\001") at core/resolve.c:1675
he = 0x0
ip = 0x0
tmp = "sip.nemox.net", '\000' <repeats 242 times>
l = 0x0
naptr_head = 0x0
n_proto = 0 '\000'
srv_name = {
s = 0x7f97390fee12 <sr_kemi_lua_exec_func_514> "UH\211\345H\203\354\020H\211}\370H\213E\370\276\002\002",
len = 1051642410
}
tried_bmp = 0
origproto = 0 '\000'
__func__ = "naptr_sip_resolvehost"
#7 0x00000000005983c6 in _sip_resolvehost (name=0x7ffe2446e100, port=0x7ffe2446df1c, proto=0x7f973a751788 "\001") at core/resolve.c:1707
res = 0x0
#8 0x000000000049943c in dns_srv_sip_resolvehost (name=0x7ffe2446e100, port=0x7ffe2446df1c, proto=0x7f973a751788 "\001") at core/dns_cache.c:2516
he = 0x7f9739119c91 <luaD_callnoyield+449>
ip = 0x7f97390fca97 <sr_kemi_lua_exec_func_221>
tmp = '\000' <repeats 255 times>
srv_name = {
s = 0x1a67740 "\020h\247\001",
len = 0
}
srv_proto = 0 '\000'
__func__ = "dns_srv_sip_resolvehost"
#9 0x000000000049b3de in dns_sip_resolvehost (name=0x7ffe2446e100, port=0x7ffe2446df1c, proto=0x7f973a751788 "\001") at core/dns_cache.c:2738
No locals.
#10 0x000000000059846b in sip_hostport2su (su=0x7f973a751700, name=0x7ffe2446e100, port=5060, proto=0x7f973a751788 "\001") at core/resolve.c:1727
he = 0x7f973e33d2be
__func__ = "sip_hostport2su"
#11 0x00007f9739efdff0 in uri2dst2 (dns_h=0x7f973a751888, dst=0x7f973a7516f8, force_send_socket=0x0, sflags=..., uri=0x7f973e3390d0, proto=0) at /git/voip/kamailio/src/modules/tm/ut.h:308
parsed_uri = {
user = {
s = 0x7f973e33d2b4 "enum-test(a)sip.nemox.net",
len = 9
},
passwd = {
s = 0x0,
len = 0
},
host = {
s = 0x7f973e33d2be "sip.nemox.net",
len = 13
},
port = {
s = 0x0,
len = 0
},
params = {
s = 0x0,
len = 0
},
sip_params = {
s = 0x0,
len = 0
},
headers = {
s = 0x0,
len = 0
},
port_no = 0,
proto = 0,
type = SIP_URI_T,
flags = 0,
transport = {
s = 0x0,
len = 0
},
ttl = {
s = 0x0,
len = 0
},
user_param = {
s = 0x0,
len = 0
},
maddr = {
s = 0x0,
len = 0
},
method = {
s = 0x0,
len = 0
},
lr = {
s = 0x0,
len = 0
},
r2 = {
s = 0x0,
len = 0
},
gr = {
s = 0x0,
len = 0
},
transport_val = {
s = 0x0,
len = 0
},
ttl_val = {
s = 0x0,
len = 0
},
user_param_val = {
s = 0x0,
len = 0
},
maddr_val = {
s = 0x0,
len = 0
},
method_val = {
s = 0x0,
len = 0
},
lr_val = {
s = 0x0,
len = 0
},
r2_val = {
s = 0x0,
len = 0
},
gr_val = {
s = 0x0,
len = 0
}
}
uri_proto = PROTO_NONE
host = 0x7ffe2446e100
ip_found = 0
to = {
s = {
sa_family = 57744,
sa_data = "F$\376\177\000\000\211\216\0169\227\177\000"
},
sin = {
sin_family = 57744,
sin_port = 9286,
sin_addr = {
s_addr = 32766
},
sin_zero = "\211\216\0169\227\177\000"
},
sin6 = {
sin6_family = 57744,
sin6_port = 9286,
sin6_flowinfo = 32766,
sin6_addr = {
__in6_u = {
__u6_addr8 = "\211\216\0169\227\177\000\000\001\000\000\000\000\000\000",
__u6_addr16 = {36489, 14606, 32663, 0, 1, 0, 0, 0},
__u6_addr32 = {957255305, 32663, 1, 0}
}
},
sin6_scope_id = 1042640912
},
sas = {
ss_family = 57744,
__ss_padding = "F$\376\177\000\000\211\216\0169\227\177\000\000\001\000\000\000\000\000\000\000\020p%>\227\177\000\000\260\340F$\376\177\000\000\304\311K", '\000' <repeats 37 times>, "\020;\v:\227\177\000\000\360\2153>\227\177\000\000Px\246\001\000\000\000\000\230\2243>\227\177\000\000\002\000\000\000\000\000\000",
__ss_align = 27947488
}
}
err = 32766
__func__ = "uri2dst2"
#12 0x00007f9739f00878 in prepare_new_uac (t=0x7f973a751408, i_req=0x7f973e338df0, branch=0, uri=0x7ffe2446e490, path=0x7ffe2446e470, next_hop=0x7f973e3390d0, fsocket=0x0, snd_flags=..., fproto=0, flags=2, instance=0x7ffe2446e460, ruid=0x7ffe2446e450, location_ua=0x7ffe2446e440) at t_fwd.c:447
shbuf = 0x0
add_rm_backup = 0x7f973e33b288
body_lumps_backup = 0x0
parsed_uri_bak = {
user = {
s = 0x7f973e33a634 "enum-test(a)sip.nemox.net",
len = 9
},
passwd = {
s = 0x0,
len = 0
},
host = {
s = 0x7f973e33a63e "sip.nemox.net",
len = 13
},
port = {
s = 0x0,
len = 0
},
params = {
s = 0x0,
len = 0
},
sip_params = {
s = 0x0,
len = 0
},
headers = {
s = 0x0,
len = 0
},
port_no = 0,
proto = 0,
type = SIP_URI_T,
flags = 0,
transport = {
s = 0x0,
len = 0
},
ttl = {
s = 0x0,
len = 0
},
user_param = {
s = 0x0,
len = 0
},
maddr = {
s = 0x0,
len = 0
},
method = {
s = 0x0,
len = 0
},
lr = {
s = 0x0,
len = 0
},
r2 = {
s = 0x0,
len = 0
},
gr = {
s = 0x0,
len = 0
},
transport_val = {
s = 0x0,
len = 0
},
ttl_val = {
s = 0x0,
len = 0
},
user_param_val = {
s = 0x0,
len = 0
},
maddr_val = {
s = 0x0,
len = 0
},
method_val = {
s = 0x0,
len = 0
},
lr_val = {
s = 0x0,
len = 0
},
r2_val = {
s = 0x0,
len = 0
},
gr_val = {
s = 0x0,
len = 0
}
}
ret = -1
len = 32663
parsed_uri_ok_bak = 1
free_new_uri = 1
msg_uri_bak = {
s = 0x7f973e33a630 "sip:enum-test@sip.nemox.net",
len = 27
}
dst_uri_bak = {
s = 0x0,
len = 0
}
dst_uri_backed_up = 1
path_bak = {
s = 0x0,
len = 0
}
free_path = 1
instance_bak = {
s = 0x0,
len = 0
}
free_instance = 1
ruid_bak = {
s = 0x0,
len = 0
}
free_ruid = 1
ua_bak = {
s = 0x0,
len = 0
}
free_ua = 1
backup_route_type = 1
test_dst = 23
fwd_snd_flags_bak = {
f = 0,
blst_imask = 0
}
rpl_snd_flags_bak = {
f = 1,
blst_imask = 0
}
force_send_socket_bak = 0x0
dst = 0x7f973a7516f8
ctx = {
rec_lev = 0,
run_flags = 0,
last_retcode = 0,
jmp_env = {{
__jmpbuf = {140729507046528, 107383054981, 140729507046336, 7983668, 140729507046712, 140729507046688, 0, 0},
__mask_was_saved = 0,
__saved_mask = {
__val = {0, 0, 0, 0, 1016, 2510101137099545603, 12909040900923746448, 140729507046448, 7983053, 3689621524717335394, 0, 140729507046488, 140729507046688, 8, 8872581, 4179003179399}
}
}}
}
bctx = 0x0
keng = 0x913440 <_sr_kemi_eng_list>
__func__ = "prepare_new_uac"
#13 0x00007f9739f058f0 in add_uac (t=0x7f973a751408, request=0x7f973e338df0, uri=0x7f973e3390d0, next_hop=0x7f973e3390d0, path=0x7f973e339498, proxy=0x0, fsocket=0x0, snd_flags=..., proto=0, flags=2, instance=0x7f973e3394a8, ruid=0x7f973e3394c0, location_ua=0x7f973e3394d0) at t_fwd.c:814
ret = 0
branch = 0
__func__ = "add_uac"
#14 0x00007f9739f0f73f in t_forward_nonack (t=0x7f973a751408, p_msg=0x7f973e338df0, proxy=0x0, proto=0) at t_fwd.c:1694
branch_ret = 0
lowest_ret = -1
added_branches = 0
first_branch = 0
i = 32766
t_invite = 0x7f973e33c570
success_branch = 608627136
try_new = 1
lock_replies = 939792
backup_bflags = 0
obranch = {
uri = {
s = 0x1f600000000 <error: Cannot access memory at address 0x1f600000000>,
len = 27594632
},
dst_uri = {
s = 0x1 <error: Cannot access memory at address 0x1>,
len = 27947488
},
q = 27687040,
path = {
s = 0x7f97390fca97 <sr_kemi_lua_exec_func_221> "UH\211\345H\203\354\020H\211}\370H\213E\370\276", <incomplete sequence \335>,
len = 608627072
},
flags = 972537629,
force_socket = 0x1,
ruid = {
s = 0x7ffe2446e950 "",
len = 608627120
},
instance = {
s = 0x6400000001 <error: Cannot access memory at address 0x6400000001>,
len = 1043566064
},
location_ua = {
s = 0x7f973a751408 "p\344\032:\227\177",
len = 8388608
},
otcpid = 7449488
}
__func__ = "t_forward_nonack"
#15 0x00007f9739ef6bc5 in t_relay_to (p_msg=0x7f973e338df0, proxy=0x0, proto=0, replicate=0) at t_funcs.c:332
ret = 0
new_tran = 1
t = 0x7f973a751408
dst = {
send_sock = 0x7ffe2446eb80,
to = {
s = {
sa_family = 50040,
sa_data = "3>\227\177\000\000\000\000\000\000\000\000\000"
},
sin = {
sin_family = 50040,
sin_port = 15923,
sin_addr = {
s_addr = 32663
},
sin_zero = "\000\000\000\000\000\000\000"
},
sin6 = {
sin6_family = 50040,
sin6_port = 15923,
sin6_flowinfo = 32663,
sin6_addr = {
__in6_u = {
__u6_addr8 = "\000\000\000\000\000\000\000\000\020p%>\227\177\000",
__u6_addr16 = {0, 0, 0, 0, 28688, 15909, 32663, 0},
__u6_addr32 = {0, 0, 1042640912, 32663}
}
},
sin6_scope_id = 27687040
},
sas = {
ss_family = 50040,
__ss_padding = "3>\227\177\000\000\000\000\000\000\000\000\000\000\020p%>\227\177\000\000\200x\246\001\000\000\000\000\320\377\377\377\377\377\377\377\000\000\000\000\000\000\000\000\300c\252\001\000\000\000\000\200x\246\001\000\000\000\000\360\273\0179\227\177\000\000\200\353F$\376\177\000\000\257\363G\000\000\000\000\000\000\000\000\000S\003\000\000\360\2153>\227\177", '\000' <repeats 14 times>, "\022\000\000",
__ss_align = 140287560368784
}
},
id = 1043579664,
send_flags = {
f = 32663,
blst_imask = 0
},
proto = 0 '\000',
proto_pad0 = 0 '\000',
proto_pad1 = 0
}
port = 0
host = {
s = 0x0,
len = 1043579608
}
comp = 0
__func__ = "t_relay_to"
#16 0x00007f9739f48a33 in _w_t_relay_to (p_msg=0x7f973e338df0, proxy=0x0, force_proto=0) at tm.c:1764
t = 0x7ffe2446ec30
res = 3
__func__ = "_w_t_relay_to"
#17 0x00007f9739f51dec in ki_t_relay (msg=0x7f973e338df0) at tm.c:2917
No locals.
#18 0x00007f97390eb94c in sr_kemi_lua_exec_func_ex (L=0x1a50f88, ket=0x7f9739ff5be0 <tm_kemi_exports>, pdelta=0) at app_lua_api.c:1022
i = 1
argc = 0
ret = 1
fname = 0x7f9739ff5bf0 <tm_kemi_exports+16>
mname = 0x7f9739ff5be0 <tm_kemi_exports>
vps = {{
n = 27739704,
s = {
s = 0x1a74638 "ksr_failure_manage",
len = 18
}
}, {
n = 0,
s = {
s = 0x0,
len = 0
}
}, {
n = 0,
s = {
s = 0x0,
len = 0
}
}, {
n = 0,
s = {
s = 0x0,
len = 0
}
}, {
n = 0,
s = {
s = 0x0,
len = 0
}
}, {
n = 0,
s = {
s = 0x0,
len = 0
}
}}
env_L = 0x7f9739175a00 <_sr_L_env>
xret = 0x7f973a047580 <_sr_kemi_kx_xval>
__func__ = "sr_kemi_lua_exec_func_ex"
#19 0x00007f97390f337e in sr_kemi_lua_exec_func (L=0x1a50f88, eidx=221) at app_lua_api.c:1706
ket = 0x7f9739ff5be0 <tm_kemi_exports>
ret = 1
tvb = {
tv_sec = 0,
tv_usec = 0
}
tve = {
tv_sec = 0,
tv_usec = 0
}
tz = {
tz_minuteswest = 1052892288,
tz_dsttime = 32663
}
tdiff = 27594832
dinfo = {
event = 1043568344,
name = 0x7f973e339980 <incomplete sequence \350>,
namewhat = 0x7ffe2446f03e "",
what = 0x3000000018 <error: Cannot access memory at address 0x3000000018>,
source = 0x7ffe2446efa0 "\200x\246\001",
srclen = 140729507049184,
currentline = 8989040,
linedefined = 0,
lastlinedefined = 73,
nups = 0 '\000',
nparams = 0 '\000',
isvararg = 0 '\000',
istailcall = 0 '\000',
ftransfer = 4176,
ntransfer = 421,
short_src = "\000\000\000\000\004\000\000\000\000\000\000\000I\000\000\000\000\000\000\000\204\275\256>\227\177\000\000\300\a\000\000\000\000\000\000@\000\000\000\000\000\000\000\005\000\000\000\000\000\000\000P\020\245\001\000\000\000",
i_ci = 0x1a50f88
}
__func__ = "sr_kemi_lua_exec_func"
#20 0x00007f97390fcab4 in sr_kemi_lua_exec_func_221 (L=0x1a50f88) at app_lua_kemi_export.c:1813
No locals.
#21 0x00007f97391193c1 in luaD_precall () from /var/lib/containers/storage/overlay/1ba9d537e5be2b3a47b220bd68cdb6646cd0a1f4ebb83a234c8bcc2324ca5f3f/merged/lib64/kamailio/modules/app_lua.so
No symbol table info available.
#22 0x00007f973912d4cb in luaV_execute () from /var/lib/containers/storage/overlay/1ba9d537e5be2b3a47b220bd68cdb6646cd0a1f4ebb83a234c8bcc2324ca5f3f/merged/lib64/kamailio/modules/app_lua.so
No symbol table info available.
#23 0x00007f9739119c91 in luaD_callnoyield () from /var/lib/containers/storage/overlay/1ba9d537e5be2b3a47b220bd68cdb6646cd0a1f4ebb83a234c8bcc2324ca5f3f/merged/lib64/kamailio/modules/app_lua.so
No symbol table info available.
#24 0x00007f973911802a in luaD_rawrunprotected () from /var/lib/containers/storage/overlay/1ba9d537e5be2b3a47b220bd68cdb6646cd0a1f4ebb83a234c8bcc2324ca5f3f/merged/lib64/kamailio/modules/app_lua.so
No symbol table info available.
#25 0x00007f973911a1e0 in luaD_pcall () from /var/lib/containers/storage/overlay/1ba9d537e5be2b3a47b220bd68cdb6646cd0a1f4ebb83a234c8bcc2324ca5f3f/merged/lib64/kamailio/modules/app_lua.so
No symbol table info available.
#26 0x00007f97391143df in lua_pcallk () from /var/lib/containers/storage/overlay/1ba9d537e5be2b3a47b220bd68cdb6646cd0a1f4ebb83a234c8bcc2324ca5f3f/merged/lib64/kamailio/modules/app_lua.so
No symbol table info available.
#27 0x00007f97390e7f0d in app_lua_run_ex (msg=0x7f973e338df0, func=0x7f973914d598 "ksr_request_route", p1=0x0, p2=0x0, p3=0x0, emode=1) at app_lua_api.c:773
n = 0
ret = 0
txt = {
s = 0x7ffe2446f520 "\020\370F$\376\177",
len = 5783320
}
bmsg = 0x0
ltop = 36
__func__ = "app_lua_run_ex"
#28 0x00007f9739106f07 in sr_kemi_config_engine_lua (msg=0x7f973e338df0, rtype=1, rname=0x0, rparam=0x0) at app_lua_mod.c:119
ret = -1
__func__ = "sr_kemi_config_engine_lua"
#29 0x00000000005048bf in sr_kemi_route (keng=0x913440 <_sr_kemi_eng_list>, msg=0x7f973e338df0, rtype=1, ename=0x0, edata=0x0) at core/kemi.c:3784
sfbk = 0
ret = 1054122048
#30 0x000000000058890a in receive_msg (buf=0x9b22a0 <buf> "INVITE sip:+437200101011@sip.example.org SIP/2.0\r\nVia: SIP/2.0/UDP 192.168.0.199:40867;TH=div;rport;branch=z9hG4bKvB942Z25j6t6Q\r\nMax-Forwards: 69\r\nFrom: <sip:myself@sip.example.org>;tag=vmjX7H12KrH1B\r\nTo: <sip:+437200101011@sip.example.org>\r\nCall-ID: 8956e785-1905-123c-24bb-e4aaeae9dd8b\r\nCSeq: 62865321 INVITE\r\nContact: <sip:myself@sip.example.org>\r\nUser-Agent: calls sofia-sip/1.13.12\r\nAllow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE\r\nSupported: timer, 100rel, replaces, gruu, outbound\r\nProxy-Authorization: Digest username=\"myself\", realm=\"example.int\", nonce=\"Y9QB/GPUANBJum6LTOLsDnjaSLKc/8o1A1zk1oUtFXzlFe/OfiMEAg==\", algorithm=MD5, uri=\"sip:+437200101011@sip.example.org\", response=\"da2f40487bb63329105222dab911d9bd\"\r\nContent-Type: application/sdp\r\nContent-Disposition: session\r\nContent-Length: 240\r\nTH: dih\r\n\r\nv=0\r\no=- 9163509233734166984 5909793187606445082 IN IP4 192.168.0.199\r\ns=-\r\nc=IN IP4 22.222.222.222\r\nt=0 0\r\nm=audio 43264 RTP/AVP 9 8 0 3\r\na=rtpmap:9 G722/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:3 GSM/8000\r\na=rtcp:33730\r\n", len=1093, rcv_info=0x7ffe2446fae0) at core/receive.c:502
msg = 0x7f973e338df0
ctx = {
rec_lev = 256,
run_flags = 16777216,
last_retcode = 0,
jmp_env = {{
__jmpbuf = {1099511627776, 512, 0, 0, 0, 0, 0, 0},
__mask_was_saved = 0,
__saved_mask = {
__val = {0, 0, 0, 0, 0, 0, 0, 4294967296, 1225543208507932942, 33554432, 3298534883584, 72057594037928192, 72057594037927936, 1099511627776, 512, 0}
}
}}
}
bctx = 0x0
ret = 0
tvb = {
tv_sec = 0,
tv_usec = 0
}
tve = {
tv_sec = 0,
tv_usec = 0
}
diff = 0
inb = {
s = 0x9b22a0 <buf> "INVITE sip:+437200101011@sip.example.org SIP/2.0\r\nVia: SIP/2.0/UDP 192.168.0.199:40867;TH=div;rport;branch=z9hG4bKvB942Z25j6t6Q\r\nMax-Forwards: 69\r\nFrom: <sip:myself@sip.example.org>;tag=vmjX7H12KrH1B\r\nTo: <sip:+437200101011@sip.example.org>\r\nCall-ID: 8956e785-1905-123c-24bb-e4aaeae9dd8b\r\nCSeq: 62865321 INVITE\r\nContact: <sip:myself@sip.example.org>\r\nUser-Agent: calls sofia-sip/1.13.12\r\nAllow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE\r\nSupported: timer, 100rel, replaces, gruu, outbound\r\nProxy-Authorization: Digest username=\"myself\", realm=\"example.int\", nonce=\"Y9QB/GPUANBJum6LTOLsDnjaSLKc/8o1A1zk1oUtFXzlFe/OfiMEAg==\", algorithm=MD5, uri=\"sip:+437200101011@sip.example.org\", response=\"da2f40487bb63329105222dab911d9bd\"\r\nContent-Type: application/sdp\r\nContent-Disposition: session\r\nContent-Length: 240\r\nTH: dih\r\n\r\nv=0\r\no=- 9163509233734166984 5909793187606445082 IN IP4 192.168.0.199\r\ns=-\r\nc=IN IP4 22.222.222.222\r\nt=0 0\r\nm=audio 43264 RTP/AVP 9 8 0 3\r\na=rtpmap:9 G722/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:3 GSM/8000\r\na=rtcp:33730\r\n",
len = 1093
}
netinfo = {
data = {
s = 0x0,
len = 0
},
bufsize = 0,
rcv = 0x0,
dst = 0x0
}
keng = 0x913440 <_sr_kemi_eng_list>
evp = {
data = 0x7ffe2446f630,
obuf = {
s = 0x0,
len = 0
},
rcv = 0x7ffe2446fae0,
dst = 0x0,
req = 0x0,
rpl = 0x0,
rplcode = 0,
mode = 0
}
cidlockidx = 0
cidlockset = 0
errsipmsg = 0
exectime = 0
__func__ = "receive_msg"
#31 0x00000000006cad81 in udp_rcv_loop () at core/udp_server.c:544
len = 1077
buf = "INVITE sip:+437200101011@sip.example.org SIP/2.0\r\nVia: SIP/2.0/UDP 192.168.0.199:40867;TH=div;rport;branch=z9hG4bKvB942Z25j6t6Q\r\nMax-Forwards: 69\r\nFrom: <sip:myself@sip.example.org>;tag=vmjX7H12KrH1B\r\nTo: <sip:+437200101011@sip.example.org>\r\nCall-ID: 8956e785-1905-123c-24bb-e4aaeae9dd8b\r\nCSeq: 62865321 INVITE\r\nContact: <sip:myself@sip.example.org>\r\nUser-Agent: calls sofia-sip/1.13.12\r\nAllow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE\r\nSupported: timer, 100rel, replaces, gruu, outbound\r\nProxy-Authorization: Digest username=\"myself\", realm=\"example.int\", nonce=\"Y9QB/GPUANBJum6LTOLsDnjaSLKc/8o1A1zk1oUtFXzlFe/OfiMEAg==\", algorithm=MD5, uri=\"sip:+437200101011@sip.example.org\", response=\"da2f40487bb63329105222dab911d9bd\"\r\nContent-Type: application/sdp\r\nContent-Disposition: session\r\nContent-Length: 240\r\nTH: dih\r\n\r\nv=0\r\no=- 9163509233734166984 5909793187606445082 IN IP4 192.168.0.199\r\ns=-\r\nc=IN IP4 22.222.222.222\r\nt=0 0\r\nm=audio 43264 RTP/AVP 9 8 0 3\r\na=rtpmap:9 G722/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:3 GSM/8000\r\na=rtcp:33730\r\n", '\000' <repeats 64442 times>
tmp = 0x13a3d9090 <error: Cannot access memory at address 0x13a3d9090>
fromaddr = 0x7f973e338ba8
fromaddrlen = 16
rcvi = {
src_ip = {
af = 2,
len = 4,
u = {
addrl = {2576512599, 0},
addr32 = {2576512599, 0, 0, 0},
addr16 = {30295, 39314, 0, 0, 0, 0, 0, 0},
addr = "Wv\222\231", '\000' <repeats 11 times>
}
},
dst_ip = {
af = 2,
len = 4,
u = {
addrl = {1317948560, 0},
addr32 = {1317948560, 0, 0, 0},
addr16 = {19600, 20110, 0, 0, 0, 0, 0, 0},
addr = "\220L\216N", '\000' <repeats 11 times>
}
},
src_port = 40867,
dst_port = 5060,
proto_reserved1 = 0,
proto_reserved2 = 0,
src_su = {
s = {
sa_family = 2,
sa_data = "\237\243Wv\222\231\000\000\000\000\000\000\000"
},
sin = {
sin_family = 2,
sin_port = 41887,
sin_addr = {
s_addr = 2576512599
},
sin_zero = "\000\000\000\000\000\000\000"
},
sin6 = {
sin6_family = 2,
sin6_port = 41887,
sin6_flowinfo = 2576512599,
sin6_addr = {
__in6_u = {
__u6_addr8 = '\000' <repeats 15 times>,
__u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
__u6_addr32 = {0, 0, 0, 0}
}
},
sin6_scope_id = 0
},
sas = {
ss_family = 2,
__ss_padding = "\237\243Wv\222\231", '\000' <repeats 111 times>,
__ss_align = 0
}
},
bind_address = 0x7f973e2e7768,
rflags = 0,
proto = 1 '\001',
proto_pad0 = 0 '\000',
proto_pad1 = 0
}
evp = {
data = 0x0,
obuf = {
s = 0x0,
len = 0
},
rcv = 0x0,
dst = 0x0,
req = 0x0,
rpl = 0x0,
rplcode = 0,
mode = 0
}
printbuf = "\000\000\000\000\000\000\000\000\270\003G$\376\177\000\000\370\235\216\000\000\000\000\000@\240\324>\227\177\000\000\340\370F$\376\177\000\000D\204\0209\227\177\000\000\370\235\216\000\000\000\000\000@\240\324>\005\000\000\000\260\371F$\376\177\000\000\263\372b", '\000' <repeats 57 times>, "\005\000\000\000P\2210>\227\177", '\000' <repeats 90 times>, "\274\202=:\227\177\000\000\000\000\000\000\004\000\000\000\260-\205\000\000\000\000\000\370\235\216\000\000\000\000\000@\240\324>\005\000\000\000\200\372F$\376\177\000\000\263\372b", '\000' <repeats 13 times>, "0^\235\000\000\000\000\000\000^\235\000\000\000\000\000\230g\235\000\000\000\000\000K\306[\302!\307S\354\230\"7(ɘR\354\263ƚ\316\005\000\000\000\350\2260>\227\177\000\000 ^\235\000\000\000\000\000\230g\235\000\000\000\000\000\031\216\n\274\001\000\000\000@h\235\000\000\000\000\000P\372F$\376\177\000\000\240h\235\000\000\000\000\000\240g\235\000\000\000\000\000\000^\235\000\000\000\000\000p\372F$\376\177\000\000\235\275y\000\000\000\000\000p\372F$\376\177\000\000\274\202=:\227\177\000\000\000\000\000\000\000\000\000\000\270\003G$\376\177\000\000\370\235\216\000\000\000\000\000@\240\324>\227\177\000\0000\373F$\376\177\000\000\250\002c\000\000\000\000\000\320\372F$\376\177\000\000\213\305y\000\000\000\000"
i = -1
j = 41600
l = 5
__func__ = "udp_rcv_loop"
#32 0x000000000042d3af in main_loop () at main.c:1722
i = 4
pid = 0
si = 0x7f973e2e7768
si_desc = "udp receiver child=4 sock=111.11.111.11:5060\000\000d\000p\375F$\376\177\000\000\000\000\000\000\000\000\000\000\200\375F$\376\177\000\000s\300\3229\227\177\000\000\020\376F$\376\177\000\000\v\006\3239\227\177\000\000`\375F$\376\177\000\0001\rp\000\000\000\000\000\320/\203\000\000\000\000\000\001\000\000\000k\000\000"
nrprocs = 8
woneinit = 1
__func__ = "main_loop"
#33 0x00000000004390be in main (argc=3, argv=0x7ffe24470398) at main.c:3078
cfg_stream = 0x1931380
c = -1
r = 0
tmp = 0x0
tmp_len = 0
port = 0
proto = 0
ahost = 0x0
aport = 0
options = 0x8081f8 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
ret = -1
seed = 3092184453
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 2
n_lst = 0x0
p = 0x0
st = {
st_dev = 65025,
st_ino = 3424267,
st_nlink = 3,
st_mode = 16895,
st_uid = 65534,
st_gid = 65534,
__pad0 = 0,
st_rdev = 0,
st_size = 4096,
st_blksize = 4096,
st_blocks = 8,
st_atim = {
tv_sec = 1674835346,
tv_nsec = 294486590
},
st_mtim = {
tv_sec = 1674837962,
tv_nsec = 574996365
},
st_ctim = {
tv_sec = 1674837962,
tv_nsec = 574996365
},
__glibc_reserved = {0, 0, 0}
}
tbuf = "D\377F$\376\177", '\000' <repeats 18 times>, "hq\247>\227\177\000\000\200\374\245>\227\177\000\000\020\000G$\376\177\000\000\b\000G$\376\177\000\000W\301\000\000\000\000\000\000``\321>\227\177\000\000\005", '\000' <repeats 23 times>, "\210\266\324>\227\177\000\000\000p\321>\227\177\000\000\342z\321>\227\177\000\000f\024\322>\227\177\000\000\260إ>", '\000' <repeats 12 times>, "\260Z\321>\227\177\000\0008^\321>\227\177\000\000\344U0\000\000\000\000\000hq\247>\227\177\000\000\220\000G$\376\177\000\000\b\000G$\376\177\000\000\340h\321>\227\177\000\000/\v\322>\227\177\000\000\004\000\000\000\000\000\000\000\340h\321>\227\177\000\000\001", '\000' <repeats 15 times>, "\001\000\000\000\000\000\000\000\260Z\321>\227\177\000\000\260Z\321>\227\177\000\000\001\000\000\000\003\000\000\000\020\000G$\376\177\000\0008^\321>\227\177\000\000\000\000\000\000\000\000\000\000\001", '\000' <repeats 16 times>, "\037G$\376\177\000\000\001\261\324>\227\177\000\000\377\377\377\377\000\000\000\000\330w\321>\227\177\000\000\360\252\324>\227\177\000\0006\027g\n3@\022\000\000\263\324>\227\177\000\000\306\363v\n3@\022\000\005", '\000' <repeats 15 times>, "\260Z\321>\227\177\000\000\017\000\000\000\000\000\000\000\300\321\301>\227\177\000\000\270\003G$\376\177\000\000\370\235\216\000\000\000\000\000@\240\324>\227\177\000\000^n\322>\227\177\000\000\001", '\000' <repeats 15 times>, "\330w\321>\227\177\000\000\340\326\322>\227\177\000\000\000\000\000\000\000\000\000\000\020\003G$\376\177\000\000\003", '\000' <repeats 14 times>
option_index = 0
long_options = {{
name = 0x80a91f "help",
has_arg = 0,
flag = 0x0,
val = 104
}, {
name = 0x8054cc "version",
has_arg = 0,
flag = 0x0,
val = 118
}, {
name = 0x80a924 "alias",
has_arg = 1,
flag = 0x0,
val = 1024
}, {
name = 0x80a92a "subst",
has_arg = 1,
flag = 0x0,
val = 1025
}, {
name = 0x80a930 "substdef",
has_arg = 1,
flag = 0x0,
val = 1026
}, {
name = 0x80a939 "substdefs",
has_arg = 1,
flag = 0x0,
val = 1027
}, {
name = 0x80a943 "server-id",
has_arg = 1,
flag = 0x0,
val = 1028
}, {
name = 0x80a94d "loadmodule",
has_arg = 1,
flag = 0x0,
val = 1029
}, {
name = 0x80a958 "modparam",
has_arg = 1,
flag = 0x0,
val = 1030
}, {
name = 0x80a961 "log-engine",
has_arg = 1,
flag = 0x0,
val = 1031
}, {
name = 0x80a96c "debug",
has_arg = 1,
flag = 0x0,
val = 1032
}, {
name = 0x80a972 "cfg-print",
has_arg = 0,
flag = 0x0,
val = 1033
}, {
name = 0x80a97c "atexit",
has_arg = 1,
flag = 0x0,
val = 1034
}, {
name = 0x0,
has_arg = 0,
flag = 0x0,
val = 0
}}
__func__ = "main"
quit
```
111.11.111.11 is the IP address of the server. 22.222.222.222 is my public IP address. 192.168.0.199 is my address behind NAT.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3350
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3350(a)github.com>
4
23
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
Hello. I use uac_req_send to send registration to the asterisk pool. If some asterisk did not authorize and re-sent the 401 code, the module causes a kamailio crash
### Troubleshooting
ds_select("BACKENDS","0");
while(ds_set_dst()) {
xlog("L_DBG",">>> BACKEND du=$du\n");
$uac_req(ruri)="sip:" + $(du{uri.host});
$uac_req(furi)="sip:" + $avp(username) + "@" + $(du{uri.host});
$uac_req(turi)=$uac_req(furi);
uac_req_send();
ds_next_dst();
}
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/kamailio.cfg'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00005557272803b9 in timer_list_expire (t=1180105352, h=0x7f73b30a3bb8, slow_l=0x7f73b30a73a0, slow_mark=2907) at core/timer.c:846
846 core/timer.c: No such file or directory.
(gdb) bt full
#0 0x00005557272803b9 in timer_list_expire (t=1180105352, h=0x7f73b30a3bb8, slow_l=0x7f73b30a73a0, slow_mark=2907) at core/timer.c:846
tl = 0x7f73b3a49a88
ret = 0
#1 0x00005557272809cf in timer_handler () at core/timer.c:922
saved_ticks = 1180105352
run_slow_timer = 0
i = 859
__func__ = "timer_handler"
#2 0x0000555727280f53 in timer_main () at core/timer.c:961
No locals.
#3 0x0000555726f77736 in main_loop () at /build/kamailio-5.6.4+ubuntu22.04/src/main.c:1831
i = 6
pid = 0
si = 0x0
si_desc = "udp receiver child=5 sock=10.153.5.40:5060\000\000\020\000\000\000\003\000\000\000!\000\000\000\000\262\270\224RE&\035(\247K'WU\000\000WqA'WU\000\000\000\000\000\000\000\000\000\000c\367@'WU\000\000!\000\000\000\000\000\000\000\260\325\022\371s\177\000\000 \236.\220\375\177\000\000ݕ\024'WU\000"
nrprocs = 6
woneinit = 1
__func__ = "main_loop"
#4 0x0000555726f83d11 in main (argc=12, argv=0x7ffd902ea398) at /build/kamailio-5.6.4+ubuntu22.04/src/main.c:3078
cfg_stream = 0x555727e12380
c = -1
r = 0
tmp = 0x7ffd902ebe36 ""
tmp_len = 0
port = 0
proto = 0
ahost = 0x0
aport = 0
options = 0x55572744e898 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
ret = -1
seed = 4270110361
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 0
n_lst = 0x7ffd902ea398
p = 0x7ffd902ea310 ""
st = {st_dev = 25, st_ino = 5514, st_nlink = 2, st_mode = 16888, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 40, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1690276408, tv_nsec = 971865637}, st_mtim = {tv_sec = 1690276408,
tv_nsec = 971865637}, st_ctim = {tv_sec = 1690276408, tv_nsec = 971865637}, __glibc_reserved = {0, 0, 0}}
tbuf = '\000' <repeats 80 times>, "\377\000\000\000\377\000\000\000\000\377\000\000\000\000\000\000", '/' <repeats 16 times>, "\230\r", '\000' <repeats 14 times>, "`", '\000' <repeats 15 times>, "\001", '\000' <repeats 144 times>...
option_index = 12
long_options = {{name = 0x55572740a2e9 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55572740b84a "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x55572740f6e4 "alias", has_arg = 1, flag = 0x0, val = 1024}, {name = 0x55572740a2ee "subst",
has_arg = 1, flag = 0x0, val = 1025}, {name = 0x55572740a2f4 "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x55572740a2fd "substdefs", has_arg = 1, flag = 0x0, val = 1027}, {name = 0x55572740a307 "server-id", has_arg = 1, flag = 0x0, val = 1028},
{name = 0x55572740a311 "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {name = 0x55572740a31c "modparam", has_arg = 1, flag = 0x0, val = 1030}, {name = 0x55572740a325 "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x55572740b967 "debug",
has_arg = 1, flag = 0x0, val = 1032}, {name = 0x55572740a330 "cfg-print", has_arg = 0, flag = 0x0, val = 1033}, {name = 0x55572740a33a "atexit", has_arg = 1, flag = 0x0, val = 1034}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
__func__ = "main"
(gdb) info locals
tl = 0x7f73b3a49a88
ret = 0
(gdb) list
841 in core/timer.c
(gdb)
```
```
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f /etc/kamailio/kamailio.cfg'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f73f575d4d0 in free_hash_table () at /build/kamailio-5.6.4+ubuntu22.04/src/modules/tm/h_table.c:464
464 /build/kamailio-5.6.4+ubuntu22.04/src/modules/tm/h_table.c: No such file or directory.
(gdb) bt full
#0 0x00007f73f575d4d0 in free_hash_table () at /build/kamailio-5.6.4+ubuntu22.04/src/modules/tm/h_table.c:464
p_cell = 0x0
tmp_cell = 0x0
i = 64459
__func__ = "free_hash_table"
#1 0x00007f73f5793e46 in tm_shutdown () at /build/kamailio-5.6.4+ubuntu22.04/src/modules/tm/t_funcs.c:88
__func__ = "tm_shutdown"
#2 0x00005557271db17b in destroy_modules () at core/sr_module.c:842
t = 0x7f73f68a65a0
foo = 0x7f73f68a59e0
__func__ = "destroy_modules"
#3 0x0000555726f64029 in cleanup (show_status=1) at /build/kamailio-5.6.4+ubuntu22.04/src/main.c:561
memlog = 0
__func__ = "cleanup"
#4 0x0000555726f66044 in shutdown_children (sig=15, show_status=1) at /build/kamailio-5.6.4+ubuntu22.04/src/main.c:704
__func__ = "shutdown_children"
#5 0x0000555726f697dc in handle_sigs () at /build/kamailio-5.6.4+ubuntu22.04/src/main.c:802
chld = 0
chld_status = 139
any_chld_stopped = 1
memlog = 0
__func__ = "handle_sigs"
#6 0x0000555726f78f42 in main_loop () at /build/kamailio-5.6.4+ubuntu22.04/src/main.c:1900
i = 6
pid = 37846
si = 0x0
si_desc = "udp receiver child=5 sock=10.153.5.40:5060\000\000\020\000\000\000\003\000\000\000!\000\000\000\000\262\270\224RE&\035(\247K'WU\000\000WqA'WU\000\000\000\000\000\000\000\000\000\000c\367@'WU\000\000!\000\000\000\000\000\000\000\260\325\022\371s\177\000\000 \236.\220\375\177\000\000ݕ\024'WU\000"
nrprocs = 6
woneinit = 1
__func__ = "main_loop"
#7 0x0000555726f83d11 in main (argc=12, argv=0x7ffd902ea398) at /build/kamailio-5.6.4+ubuntu22.04/src/main.c:3078
cfg_stream = 0x555727e12380
c = -1
r = 0
tmp = 0x7ffd902ebe36 ""
tmp_len = 0
port = 0
proto = 0
ahost = 0x0
aport = 0
options = 0x55572744e898 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
ret = -1
seed = 4270110361
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 0
n_lst = 0x7ffd902ea398
p = 0x7ffd902ea310 ""
st = {st_dev = 25, st_ino = 5514, st_nlink = 2, st_mode = 16888, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 40, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1690276408, tv_nsec = 971865637}, st_mtim = {tv_sec = 1690276408,
tv_nsec = 971865637}, st_ctim = {tv_sec = 1690276408, tv_nsec = 971865637}, __glibc_reserved = {0, 0, 0}}
tbuf = '\000' <repeats 80 times>, "\377\000\000\000\377\000\000\000\000\377\000\000\000\000\000\000", '/' <repeats 16 times>, "\230\r", '\000' <repeats 14 times>, "`", '\000' <repeats 15 times>, "\001", '\000' <repeats 144 times>...
option_index = 12
long_options = {{name = 0x55572740a2e9 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55572740b84a "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x55572740f6e4 "alias", has_arg = 1, flag = 0x0, val = 1024}, {name = 0x55572740a2ee "subst",
has_arg = 1, flag = 0x0, val = 1025}, {name = 0x55572740a2f4 "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x55572740a2fd "substdefs", has_arg = 1, flag = 0x0, val = 1027}, {name = 0x55572740a307 "server-id", has_arg = 1, flag = 0x0, val = 1028},
{name = 0x55572740a311 "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {name = 0x55572740a31c "modparam", has_arg = 1, flag = 0x0, val = 1030}, {name = 0x55572740a325 "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x55572740b967 "debug",
has_arg = 1, flag = 0x0, val = 1032}, {name = 0x55572740a330 "cfg-print", has_arg = 0, flag = 0x0, val = 1033}, {name = 0x55572740a33a "atexit", has_arg = 1, flag = 0x0, val = 1034}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
__func__ = "main"
(gdb) info locals
p_cell = 0x0
tmp_cell = 0x0
i = 64459
__func__ = "free_hash_table"
(gdb) list
459 in /build/kamailio-5.6.4+ubuntu22.04/src/modules/tm/h_table.c
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f8a6c440050), called from uac: uac_send.c: uac_send_tm_callback(860), first free uac: uac_send.c: uac_send_info_clone(110) - ignoring
CRITICAL: <core> [core/mem/q_malloc.c:123]: qm_debug_check_frag(): BUG: qm: fragm. 0x7f74379f46b0 (address 0x7f74379f46e8) beginning overwritten (0)! Memory allocator was called from uac: uac_send.c:860. Fragment marked by (null):0. Exec from core/mem/q_malloc.c:511.
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
proto:UDP 2023-07-25T10:00:44.452898Z 10.153.5.40:5060 ---> 192.168.50.107:5060
REGISTER sip:192.168.50.107 SIP/2.0
Via: SIP/2.0/UDP 10.153.5.40;branch=z9hG4bK6a0b.834627a6000000000000000000000000.0
To: <sip:3408@192.168.50.107>
From: <sip:3408@192.168.50.107>;tag=b2f228866a24b161d346cfb256d45132-a0527658
CSeq: 10 REGISTER
Call-ID: 2332840947916a3e-39417(a)10.153.5.40
Max-Forwards: 70
Content-Length: 0
Contact: <sip:3408@10.153.5.40:5060>
Expires: 150
User-Agent: PortSIP UC Client Android - v11.8.1
proto:UDP 2023-07-25T10:00:44.464436Z 192.168.50.107:5060 ---> 10.153.5.40:5060
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.153.5.40;rport=5060;received=10.153.5.40;branch=z9hG4bK6a0b.834627a6000000000000000000000000.0
Call-ID: 2332840947916a3e-39417(a)10.153.5.40
From: <sip:3408@192.168.50.107>;tag=b2f228866a24b161d346cfb256d45132-a0527658
To: <sip:3408@192.168.50.107>;tag=z9hG4bK6a0b.834627a6000000000000000000000000.0
CSeq: 10 REGISTER
WWW-Authenticate: Digest realm="vpp",nonce="1690279244/67fc12dbaf6a76fa34181a4bd504de00",opaque="1680d45809efac86",algorithm=md5,qop="auth"
Server: Asterisk
Content-Length: 0
proto:UDP 2023-07-25T10:00:44.466447Z 10.153.5.40:5060 ---> 192.168.50.107:5060
REGISTER sip:192.168.50.107 SIP/2.0
Via: SIP/2.0/UDP 10.153.5.40;branch=z9hG4bK7a0b.5673b4d4000000000000000000000000.0
To: <sip:3408@192.168.50.107>
From: <sip:3408@192.168.50.107>;tag=b2f228866a24b161d346cfb256d45132-a0527658
CSeq: 11 REGISTER
Call-ID: 2332840947916a3e-39417(a)10.153.5.40
Max-Forwards: 70
Content-Length: 0
Contact: <sip:3408@10.153.5.40:5060>
Expires: 150
Authorization: Digest username="3408", realm="vpp", nonce="1690279244/67fc12dbaf6a76fa34181a4bd504de00", uri="sip:192.168.50.107", opaque="1680d45809efac86", qop=auth, nc=00000001, cnonce="1935694403", response="38bc75e831e1267ce943bcc50f76390a", algorithm=MD5
User-Agent: PortSIP UC Client Android - v11.8.1
proto:UDP 2023-07-25T10:00:44.477675Z 192.168.50.107:5060 ---> 10.153.5.40:5060
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.153.5.40;rport=5060;received=10.153.5.40;branch=z9hG4bK7a0b.5673b4d4000000000000000000000000.0
Call-ID: 2332840947916a3e-39417(a)10.153.5.40
From: <sip:3408@192.168.50.107>;tag=b2f228866a24b161d346cfb256d45132-a0527658
To: <sip:3408@192.168.50.107>;tag=z9hG4bK7a0b.5673b4d4000000000000000000000000.0
CSeq: 11 REGISTER
WWW-Authenticate: Digest realm="vpp",nonce="1690279244/67fc12dbaf6a76fa34181a4bd504de00",opaque="5adc30b867f02d18",algorithm=md5,qop="auth"
Server: Asterisk
Content-Length: 0
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
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 11.3.0
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `lsb_release -a` and `uname -a`)
-->
```
5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3522
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3522(a)github.com>
5
11
[kamailio/kamailio] tm: memory leak in case dropping messages in local-request event route (PR #3403)
by Simon Darienko 01 May '24
by Simon Darienko 01 May '24
01 May '24
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
I faced an issue with memory leak in case drop NOTIFY messages in the "local-request" event route in `mem_copy_subs` and `build_uac_req`
analysis of mem leak:
kamcmd corex.shm_summary
<code>...
Mar 23 12:00:28 pbx kamailio[72308]: NOTICE: fm_status: fm_sums(): count= 11 size= 7520 bytes from presence: hash.c: mem_copy_subs(141)<br>
Mar 23 12:00:28 pbx kamailio[72308]: NOTICE: fm_status: fm_sums(): count= 23 size= 22536 bytes from tm: t_msgbuilder.c: build_uac_req(1618)
...</code>
a lot of dropped messages in local-request event route
<code>...
Mar 23 12:01:09 pbx kamailio[72308]: NOTICE: fm_status: fm_sums(): count= 83 size= 51256 bytes from presence: hash.c: mem_copy_subs(141)
Mar 23 12:01:09 pbx kamailio[72308]: NOTICE: fm_status: fm_sums(): count= 98 size= 116864 bytes from tm: t_msgbuilder.c: build_uac_req(1618)
...</code>
no messages, no activities
<code>...
Mar 23 12:02:34 pbx kamailio[72308]: NOTICE: fm_status: fm_sums(): count= 83 size= 51256 bytes from presence: hash.c: mem_copy_subs(141)
Mar 23 12:02:34 pbx kamailio[72308]: NOTICE: fm_status: fm_sums(): count= 96 size= 115432 bytes from tm: t_msgbuilder.c: build_uac_req(1618)
...</code>
In the code, we have a comment like "never free cbp here because if t_uac_prepare fails, cbp is not freed and thus caller has no chance to discover if it is freed or not", but we'll free the cbp in two cases:
1. in case of error, but we have if (ret == E_DROP) then ret = 0; (so, no error result)
2. in case call insert_tmcb for cbp, but we don't do it for E_DROP
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3403
-- Commit Summary --
* tm: memory leak in case dropping messages in local-request event route
-- File Changes --
M src/modules/tm/uac.c (8)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3403.patch
https://github.com/kamailio/kamailio/pull/3403.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3403
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3403(a)github.com>
4
9
15 Apr '24
### Description
Hello. Probably I'm doing something wrong but I can't get rid of **received** parameter in the **Via** header in responses from kamailio by websocket transport.
According [RFC 7118](https://datatracker.ietf.org/doc/rfc7118/):
``
When a SIP WebSocket Server receives a request, it MAY decide not
to add a "received" parameter to the top Via header. Therefore,
SIP WebSocket Clients MUST accept responses without such a
parameter in the top Via header regardless of whether the **Via**
"sent-by" field contains a domain name.
``
### Expected behavior
For responses to websocket transport have a way to not add **received** parameter in **Via** header
#### Actual observed behavior
Responses to OPTION or REGISTER methods trough websocket got **received** containing IP we want to not show to the end users.
### Possible Solutions
maybe add a param in **tm** module or something
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.2.1 (x86_64/linux)
```
and
```
kamailio 5.6.1 (x86_64/linux) b36a13
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3515
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3515(a)github.com>
4
7
[kamailio/kamailio] branch_failure route in case 503 and dns failover (PR #3138)
by vlitvinov 02 Apr '24
by vlitvinov 02 Apr '24
02 Apr '24
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
When we use DNS failover in case of timeout kamailio executes the branch_failure route. In the case of the 503 - on_reply route. This commit is to equate behavior in both cases. So if there are more candidates we will always execute branch_failure route and on_reply route only if this is the last candidate.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3138
-- Commit Summary --
* branch_failure route in case 503 and dns failover
-- File Changes --
M src/modules/tm/t_reply.c (52)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3138.patch
https://github.com/kamailio/kamailio/pull/3138.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3138
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3138(a)github.com>
4
16