QuincyGao created an issue (kamailio/kamailio#4190)
<!--
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.
Note that an issue report may be closed automatically after about 2 months
if there is no interest from developers or community users on pursuing it, being
considered expired. In such case, it can be reopened by writing a comment that includes
the token `/notexpired`. About two weeks before considered expired, the issue is
marked with the label `stale`, trying to notify the submitter and everyone else
that might be interested in it. To remove the label `stale`, write a comment that
includes the token `/notstale`. Also, any comment postpone the `expire` timeline,
being considered that there is interest in pursuing 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.
-->
I want to use opensips as SBC, When the agent registers to kamailio, the contact content is modified to the ip and port of kamailio, and then Register is forwarded to the agent.
remove_hf("Contact") can't remove the whole Contact( field, vlue).
here is my config:
```
route[REGISTRAR] {
if (!is_method("REGISTER")) return;
if(isflagset(FLT_NATS)) {
setbflag(FLB_NATB);
#!ifdef WITH_NATSIPPING
# do SIP NAT pinging
setbflag(FLB_NATSIPPING);
#!endif
}
fix_nated_contact();
if (!save("location","0x02")) {
#if (!save("location")) {
sl_reply_error();
}
$fs="udp:172.16.4.111:5461";
$du="sip:172.16.4.114:5060";
remove_hf("Contact");
$var(contact) = "Contact: <sip:" +$fU+"@"+"172.16.4.111:5461>;expires=120\r\n" ;
append_hf("$var(contact)");
route(RELAY);
exit;
}
```
here is the sip message:
```
2025/03/26 16:36:07.706093 172.16.4.111:5461 -> 172.16.4.114:5060
REGISTER sip:172.16.4.111:5460 SIP/2.0
Via: SIP/2.0/UDP 172.16.4.111:5461;branch=z9hG4bKfc7e.d2df36f3b5681afeb71e442e645de38d.0
Via: SIP/2.0/UDP 172.16.80.3:49309;received=172.16.80.3;rport=49309;branch=z9hG4bKPj8ab8bd1d3c3a4c1bb0cd639540fa3183
Max-Forwards: 69
From: <sip:1008@172.16.4.111>;tag=95f7f5601f8b40458a1efe6923ab0a29
To: <sip:1008@172.16.4.111>
Call-ID: f84b643f5d284d18a0d8175e1ef4d747
CSeq: 33264 REGISTER
User-Agent: MicroSIP/3.21.6
sip:1008@172.16.80.3:49309;obExpires: 120
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0
Contact: <sip:1008@172.16.4.111:5461>;expires=120
```
you can see the problem is that: `sip:1008@172.16.80.3:49309;obExpires: 120` ,
`sip:1008@172.16.80.3:49309` is the value of the Contact field after fix_nated_contact().
### Troubleshooting
#### 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.
-->
```
(paste your debugging data here)
```
#### 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).
-->
```
(paste your log messages here)
```
#### 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).
-->
```
(paste your sip traffic here)
```
### 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.8.5 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id:
compiled on 11:27:01 Mar 21 2025 with gcc 4.8.5
```
* **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`)
-->
```
Centos7.9
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4190
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4190(a)github.com>
al286320 created an issue (kamailio/kamailio#4298)
Hi all,
I'm new to Kamailio, and maybe this is a silly question.
I’ve set up Kamailio as a SIP proxy with two Asterisk servers acting as media services.
This is my configuration for the dispatcher module:
```
loadmodule "dispatcher.so"
modparam("dispatcher", "db_url", DBURL)
modparam("dispatcher", "table_name", "dispatcher")
modparam("dispatcher", "flags", 2)
modparam("dispatcher", "ds_ping_interval", 20)
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_probing_threshold", 5)
modparam("dispatcher", "ds_inactive_threshold", 5)
modparam("dispatcher", "ds_ping_latency_stats", 1)
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_ping_reply_codes", "class=2;code=403;code=488;class=3")
modparam("dispatcher", "ds_ping_from", SIPCALL)
```
I can see the SIP OPTIONS requests going from Kamailio to Asterisk and receiving 200 OK responses.

However, the dispatcher is still setting the IP (Inactive Probing) flag on the servers:
```
kamcmd dispatcher.list
{
NRSETS: 1
RECORDS: {
SET: {
ID: 1
TARGETS: {
DEST: {
URI: sip:172.16.254.21:5060
FLAGS: IP
PRIORITY: 0
LATENCY: {
AVG: 0
STD: 0
EST: 0
MAX: 0
TIMEOUT: 183
}
}
DEST: {
URI: sip:172.16.254.20:5060
FLAGS: IP
PRIORITY: 0
LATENCY: {
AVG: 0
STD: 0
EST: 0
MAX: 0
TIMEOUT: 183
}
}
}
}
}
}
```
So when I try to use `ds_select_dst("1", "4")`, it always fails.
Did I miss something in my configuration?
Thanks!
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4298
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4298(a)github.com>
<!-- 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 -->
- [ ] 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 -->
This PR allows the functions `allow_address_group` and `allow_source_address_group` to search for Longest Prefix Match (LPM) when searching for an IP is in a subnet instead of the first found.
Since this is a stricter check, i don't think we require an extra param for it, but feel free to suggest otherwise if there are any use-cases that required the first matched.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4297
-- Commit Summary --
* permissions: Perform LPM to find the longest matching subnet
-- File Changes --
M src/modules/permissions/hash.c (23)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4297.patchhttps://github.com/kamailio/kamailio/pull/4297.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4297
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4297(a)github.com>
<!-- 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
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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)
- [ ] 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
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4276
-- Commit Summary --
* add remove all header function
-- File Changes --
M src/modules/pv_headers/pv_headers.c (9)
M src/modules/pv_headers/pvh_func.c (19)
M src/modules/pv_headers/pvh_func.h (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4276.patchhttps://github.com/kamailio/kamailio/pull/4276.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4276
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4276(a)github.com>
Hello,
there is (still) some incoherence in dispatcher module regarding the
marking of a destination (e.g., to inactive state) and execution of
event route.
First, which I tried to address earlier today, was that ds_mark_dst()
was taking in consideration the value of ds_probing_threshold, which was
intended for keepalives, so the use of the function was not having any
effect (as documented) till it was used so many times as the parameter
value, probably not noticed so far because the default value for the
parameter is 1. Similar would be for setting destination active and the
value of ds_inactive_threshold.
Going on the same execution path as with setting the state of a
destination based on keepalives, the use of ds_mark_dst() results in
running the event routes, which I am not sure it is really expected. But
then, setting the state of a destination via RPC is not running event
routes and it was done immediately via reinitialising the state, without
any relation to ds_probing_threshold or ds_inactive_threshold.
So the questions would be:
1) the documented way is the expected one on admin-instructed state
update (via config functions or rpc), respectively do it immediately,
without considering ds_probing_threshold or ds_inactive_threshold? It is
like now in git master branch, but for many years the config functions
took in consideration the parameters.
2) shall event routes be executed only on SIP keepalives, or also on
admin-instructed state update (via config functions or rpc)? Or leave it
only for keepalives and config functions, like it is now, with updating
documentation to be clear.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
<!-- 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
<!-- Describe your changes in detail -->
In this PR we introduce a new mode and two new parameters for accomplishing the same thing for user part also in domain part.
Docs incoming if no significant changes are needed.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4246
-- Commit Summary --
* topos: Add new contact_mode=3 and 2 new modparam for contact host domains
* topos: Refactor contact_mode handling
* topos: Append port and protocol param
-- File Changes --
M src/modules/topos/topos_mod.c (13)
M src/modules/topos/tps_storage.c (428)
M src/modules/topos/tps_storage.h (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4246.patchhttps://github.com/kamailio/kamailio/pull/4246.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4246
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4246(a)github.com>
whosgonna created an issue (kamailio/kamailio#4284)
### Description
Intermittent Kamailio crashes (a few times a week).
### Troubleshooting
Core dump created
#### Reproduction
From the backtrace it looks like the failure occurs in one of the secsipid commands. The Identity headers/values we're passing are from sources we can't control. In some cases I know that we are receiving tokens where the data can be malformated - missing `alg=` or `ppt` parameters, having certificates that cannot be downloaded due to bad links. I can recreate/mimic these types of malformation though, and it does not cause a crash.
#### Debugging Data
For privacy reasons, I can't share the full backtrace, however I'm able to print a mildly redacted short backtrace (removing phone numbers and IP addresses). I can povide portions of the full backtrace as needed as well:
```
root@e416aa3557fa:/dump# gdb /usr/sbin/kamailio ./2025-06-12_16.17.17.dmp
GNU gdb (Debian 13.1-3) 13.1
Copyright (C) 2023 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 "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://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/sbin/kamailio...
warning: Can't open file /dev/zero (deleted) during file-backed mapping note processing
[New LWP 12]
[New LWP 58]
[New LWP 88]
[New LWP 59]
[New LWP 57]
[New LWP 106]
[New LWP 305]
[New LWP 46]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
Core was generated by `/sbin/kamailio -dDDeE -u kamailio -g kamailio -e -d -m 1024 -M 48 -u kamailio -'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (threadid=281473563709472, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.
[Current thread is 1 (Thread 0xffffabc75020 (LWP 12))]
(gdb) bt
#0 __pthread_kill_implementation (threadid=281473563709472, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1 0x0000ffffaba70ab4 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2 0x0000ffffaba2a72c in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x0000ffffaba1747c in __GI_abort () at ./stdlib/abort.c:79
#4 0x0000ffffaba64aac in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0xffffabb46d28 "%s\n") at ../sysdeps/posix/libc_fatal.c:156
#5 0x0000ffffaba7aebc in malloc_printerr (str=str@entry=0xffffabb42098 "double free or corruption (!prev)") at ./malloc/malloc.c:5660
#6 0x0000ffffaba7cee8 in _int_free (av=0xffffabb90af0 <main_arena>, p=p@entry=0xaaab18d4c3e0, have_lock=<optimized out>, have_lock@entry=0) at ./malloc/malloc.c:4587
#7 0x0000ffffaba7f77c in __GI___libc_free (mem=<optimized out>) at ./malloc/malloc.c:3385
#8 0x0000ffffa6c90a0c in w_secsipid_get_url (msg=0xffffa8d511e0, purl=0xffffa8c43680 "", povar=0xffffa8c4dad0 "\004") at secsipid_mod.c:961
#9 0x0000aaaadc47d710 in do_action (h=0xfffffe56d390, a=0xffffa8c4d800, msg=0xffffa8d511e0) at core/action.c:1133
#10 0x0000aaaadc48d3c4 in run_actions (h=0xfffffe56d390, a=0xffffa8c4d800, msg=0xffffa8d511e0) at core/action.c:1620
#11 0x0000aaaadc48db44 in run_actions_safe (h=0xfffffe56e9d0, a=0xffffa8c4d800, msg=0xffffa8d511e0) at core/action.c:1683
#12 0x0000aaaadc69a7e0 in rval_get_long (h=0xfffffe56e9d0, msg=0xffffa8d511e0, i=0xfffffe56d8c8, rv=0xffffa8c4eac8, cache=0x0) at core/rvalue.c:973
#13 0x0000aaaadc6a00f0 in rval_expr_eval_long (h=0xfffffe56e9d0, msg=0xffffa8d511e0, res=0xfffffe56d8c8, rve=0xffffa8c4eac0) at core/rvalue.c:1852
#14 0x0000aaaadc6a0118 in rval_expr_eval_long (h=0xfffffe56e9d0, msg=0xffffa8d511e0, res=0xfffffe56de00, rve=0xffffa8c4f200) at core/rvalue.c:1862
#15 0x0000aaaadc47d090 in do_action (h=0xfffffe56e9d0, a=0xffffa8c50660, msg=0xffffa8d511e0) at core/action.c:1099
#16 0x0000aaaadc48d3c4 in run_actions (h=0xfffffe56e9d0, a=0xffffa8c4c4e0, msg=0xffffa8d511e0) at core/action.c:1620
#17 0x0000aaaadc479400 in do_action (h=0xfffffe56e9d0, a=0xffffa8c41060, msg=0xffffa8d511e0) at core/action.c:711
#18 0x0000aaaadc48d3c4 in run_actions (h=0xfffffe56e9d0, a=0xffffa8c41060, msg=0xffffa8d511e0) at core/action.c:1620
#19 0x0000aaaadc48db44 in run_actions_safe (h=0xfffffe570870, a=0xffffa8c41060, msg=0xffffa8d511e0) at core/action.c:1683
#20 0x0000aaaadc69a7e0 in rval_get_long (h=0xfffffe570870, msg=0xffffa8d511e0, i=0xfffffe56ef08, rv=0xffffa8c411c8, cache=0x0) at core/rvalue.c:973
#21 0x0000aaaadc6a00f0 in rval_expr_eval_long (h=0xfffffe570870, msg=0xffffa8d511e0, res=0xfffffe56ef08, rve=0xffffa8c411c0) at core/rvalue.c:1852
#22 0x0000aaaadc6a0118 in rval_expr_eval_long (h=0xfffffe570870, msg=0xffffa8d511e0, res=0xfffffe56f440, rve=0xffffa8c41900) at core/rvalue.c:1862
#23 0x0000aaaadc47d090 in do_action (h=0xfffffe570870, a=0xffffa8c428e0, msg=0xffffa8d511e0) at core/action.c:1099
#24 0x0000aaaadc48d3c4 in run_actions (h=0xfffffe570870, a=0xffffa8c428e0, msg=0xffffa8d511e0) at core/action.c:1620
#25 0x0000aaaadc47d5e8 in do_action (h=0xfffffe570870, a=0xffffa8c42a40, msg=0xffffa8d511e0) at core/action.c:1119
#26 0x0000aaaadc48d3c4 in run_actions (h=0xfffffe570870, a=0xffffa8c362f0, msg=0xffffa8d511e0) at core/action.c:1620
#27 0x0000aaaadc479400 in do_action (h=0xfffffe570870, a=0xffffa8c325b0, msg=0xffffa8d511e0) at core/action.c:711
#28 0x0000aaaadc48d3c4 in run_actions (h=0xfffffe570870, a=0xffffa8c325b0, msg=0xffffa8d511e0) at core/action.c:1620
#29 0x0000aaaadc48db44 in run_actions_safe (h=0xfffffe572f78, a=0xffffa8c325b0, msg=0xffffa8d511e0) at core/action.c:1683
#30 0x0000aaaadc69a7e0 in rval_get_long (h=0xfffffe572f78, msg=0xffffa8d511e0, i=0xfffffe570da8, rv=0xffffa8c32718, cache=0x0) at core/rvalue.c:973
#31 0x0000aaaadc6a00f0 in rval_expr_eval_long (h=0xfffffe572f78, msg=0xffffa8d511e0, res=0xfffffe570da8, rve=0xffffa8c32710) at core/rvalue.c:1852
#32 0x0000aaaadc6a0118 in rval_expr_eval_long (h=0xfffffe572f78, msg=0xffffa8d511e0, res=0xfffffe5712e0, rve=0xffffa8c32e50) at core/rvalue.c:1862
#33 0x0000aaaadc47d090 in do_action (h=0xfffffe572f78, a=0xffffa8c33cb0, msg=0xffffa8d511e0) at core/action.c:1099
#34 0x0000aaaadc48d3c4 in run_actions (h=0xfffffe572f78, a=0xffffa8c313a0, msg=0xffffa8d511e0) at core/action.c:1620
#35 0x0000aaaadc4895fc in do_action (h=0xfffffe572f78, a=0xffffa8c35fb0, msg=0xffffa8d511e0) at core/action.c:1401
#36 0x0000aaaadc48d3c4 in run_actions (h=0xfffffe572f78, a=0xffffa8c2e8e0, msg=0xffffa8d511e0) at core/action.c:1620
#37 0x0000aaaadc479400 in do_action (h=0xfffffe572f78, a=0xffffa8bb8070, msg=0xffffa8d511e0) at core/action.c:711
#38 0x0000aaaadc48d3c4 in run_actions (h=0xfffffe572f78, a=0xffffa8bb7980, msg=0xffffa8d511e0) at core/action.c:1620
#39 0x0000aaaadc47d5a8 in do_action (h=0xfffffe572f78, a=0xffffa8bb81d0, msg=0xffffa8d511e0) at core/action.c:1115
#40 0x0000aaaadc48d3c4 in run_actions (h=0xfffffe572f78, a=0xffffa8bb0710, msg=0xffffa8d511e0) at core/action.c:1620
#41 0x0000aaaadc48dbf4 in run_top_route (a=0xffffa8bb0710, msg=0xffffa8d511e0, c=0x0) at core/action.c:1703
#42 0x0000aaaadc63fff8 in receive_msg (
buf=0xaaaadcba84b8 <buf> "INVITE sip:15555555555@sti-cnam SIP/2.0\r\nRecord-Route: <sip:1.2.3.40;lr=on;ftag=gK0e581301;dlgcor=3df.ea65>\r\nVia: SIP/2.0/UDP 1.2.3.40:5060;branch=z9hG4bK7dd5.1fd1b25d525136f68cd8dba517eaf"..., len=2363,
rcv_info=0xfffffe573790) at core/receive.c:520
#43 0x0000aaaadc7dabe0 in udp_rcv_loop () at core/udp_server.c:770
#44 0x0000aaaadc4626a8 in main_loop () at main.c:1895
#45 0x0000aaaadc471e88 in main (argc=16, argv=0xfffffe573ef8) at main.c:3406
(gdb) info locals
tid = 12
ret = 0
pd = 0xffffabc75020
old_mask = {__val = {281474948845152}}
ret = <optimized out>
(gdb) list
39 in ./nptl/pthread_kill.c
```
From the full backtrace at #8:
```
#8 0x0000ffffa6c90a0c in w_secsipid_get_url (msg=0xffffa8d511e0, purl=0xffffa8c43680 "", povar=0xffffa8c4dad0 "\004") at secsipid_mod.c:961
ret = 0
ovar = 0x1d4
val = {rs = {s = 0x0, len = -27866320}, ri = 187650816818084, flags = -27866184}
surl = {s = 0xffffa8a99a30 "https://t-mobile-sticr.fosrvt.com/8814f66226a3d07edcffb9cfb333c423bfe5dd0f7…", len = 102}
__func__ = "w_secsipid_get_url"
```
In this case, the certificate URL is valid and retrievable.
#### Log Messages
I'm not sure how to correlate the dump file to the PID in the log - especially because Kamailio is running a container so the logged PIDs are from the container perspective, not the host perspective.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 6.0.1 (aarch64/linux) fce50d
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT-NOSMP, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: fce50d
compiled on 13:26:51 May 12 2025 with gcc 12.2.0
```
* **Operating System**:
Container:
```
root@e416aa3557fa:/# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
```
Host:
```
[bkaufman@cr-us-west-or-01~]$ cat /etc/os-release
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023.6.20250303"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/amazon-linux-2023/"
DOCUMENTATION_URL="https://docs.aws.amazon.com/linux/"
SUPPORT_URL="https://aws.amazon.com/premiumsupport/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
VENDOR_NAME="AWS"
VENDOR_URL="https://aws.amazon.com/"
SUPPORT_END="2029-06-30"
[bkaufman@cr-us-west-or-01~]$ uname -a
Linux cr-us-west-or-01.i.prod.q.fl.gg 6.1.129-138.220.amzn2023.aarch64 #1 SMP Tue Feb 25 22:18:13 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4284
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4284(a)github.com>
kerozin created an issue (kamailio/kamailio#4294)
Kamailio 5.7.4
When I write A new value to $fU pseudovariable it acttually appends, but not replace.
A from header before manipulation: <sip:3451088@192.168.107.17>
In failure route I do
$fU = "77719365301";
The header after manipulation looks as: <sip:345108877719365301@192.168.107.17>
this behavior was reported in #3165 but closed. I believe this was happen by mistake.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4294
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4294(a)github.com>
Fix for original commit: 3202dc9d8e26620fe642e474e5cf8632ab6bc3a7
<!-- 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 -->
- [ ] 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 -->
Skip rtpengine node pinging in timer process only if node is *permanent* disabled.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4295
-- Commit Summary --
* rtpengine: don't ping manually disabled nodes
-- File Changes --
M src/modules/rtpengine/rtpengine.c (5)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4295.patchhttps://github.com/kamailio/kamailio/pull/4295.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4295
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4295(a)github.com>
Dear Gang
Possibly @oej could provide more in-depth information as he has witnessed this issue.
Usually the user of the from URI is the phone number displayed at the destination. There are situations where this phone number is translated.
As example. In Switzerland, the user is used to see numbers in a local format. National number starting with 0 and international numbers with 00 but on interconnection between telcos, e164 is used.
So basically when a call is sent to a customer '+41' is replaced by '0' and '+' is replaced by '00'.
Let's start with an example From: header:
`From: "Maurice Moss" <sip:+41991234567@example.com>;user=phone`
So shortly before the call is sent out to the location of the registered CPE, this is done:
```
if ($fU =~ "^\+41") {
$fU = "0" + $(fU{s.substr,3,0});
} else if ($fU = ~ "^\+") {
$fU = "00" + $(fU{s.substr,1,0});
}
```
What is sent to the CPE now looks like this:
`From: "Maurice Moss" <sip:0991234567@example.com>;user=phone`
Now we hit an error like 486 BUSY and the destination has call forwarding active to a mobile phone on another TSP. So we have to send the call out back the IC and numbers need to be translated back to e164.
We handle this in a failure route, which in turn could trigger a branch route.
So we revert the number back to e164:
`$fU = "+41" + $(fU{s.substr,1,0});`
Expected outcome:
`From: "Maurice Moss" <sip:+41991234567@example.com>;user=phone`
Observed outcome:
`From: "Maurice Moss" <sip:0991234567+41991234567@example.com>;user=phone`
So setting $fU more than once is appending to the user element of the From header URI.
This behavior has not been found in any documentation.
I have been working around most of the issues by making sure I change $fU (and $tU) at the latest possible time and only once. But in the case described above, I have not been able to come up with a work-around yet.
I also can't think of any benefit of the way those PV are handled or any harm that could be done, to handle them differently and make the last 'write' overwrite and previous value, instead of appending.
Thank you for looking into this.
-Benoît-
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3165
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3165(a)github.com>
therikb31 created an issue (kamailio/kamailio#4296)
For network-initiated UE de-registration, `ims_registrar_scscf` is populating the `Subscription-State` header of the `NOTIFY` message as `active;expires=3581` instead of `terminated`.
### Description
We are simulating a network-initiated UE de-registration by sending a **Registration-Termination Request** from the HSS to the S-CSCF for a registered IMSI.
**Call Flow**:
1. UE registers to the IMS core
2. S-CSCF performs third-party registration with the Application Server on behalf of the UE
3. Application Server subscribes to `Event: reg` for the registered IMSI
4. HSS sends a Registration-Termination Request for network-initiated UE de-registration
5. S-CSCF sends a `NOTIFY` to subscribers for the `IMS_REGISTRAR_CONTACT_DEREGISTERED` event (issue with the `NOTIFY` SIP message)
**Observation**:
1. `NOTIFY` messages are initiated to subscribers of `Event: reg`, but instead of having the `Subscription-State` header set to **terminated**, we observe the value **active;expires=3581**.
(Image for the `NOTIFY` SIP message packet is attached below)

### Troubleshooting
#### Reproduction
To reproduce this, we are performing the following steps:
1. Performing SIP registration of the UE with the target S-CSCF node
2. Sending `SUBSCRIBE` requests from a third-party Application Server and the UE with `Event: reg` to get notified of registration events
3. HSS sends a `Registration-Termination Request` to the target S-CSCF for the registered IMSI (network-initiated de-registration)
#### Debugging Data
#### Log Messages
While going through the logs, we find that this header is being populated based on the expiry timer and a comparison with the current timestamp:
```
2025-06-20 12:45:20 | 19(56) DEBUG: ims_registrar_scscf [registrar_notify.c:1716]: create_notifications(): Expires is greater than current time! Subscription state: [active;expires=3581]
```
#### SIP Traffic
### Possible Solutions
**Workaround**:
In the `create_notifications()` method of `src/modules/ims_registrar_scscf/registrar_notify.c`,
when populating the `Subscription-State` header, if the `event_type` is `10` (`IMS_REGISTRAR_CONTACT_DEREGISTERED`), we can populate `Subscription-State` as `terminated`.
### Additional Information
---
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4296
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4296(a)github.com>
<!-- 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)
- [ ] 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
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4256
-- Commit Summary --
* Using SSL_CTX_set_ciphersuites for TLS 1.3 and above when setting cipher list
* tls: Update TLS1.3 ciphers to use SSL_CTX_ciphhersuites on openSSL lib >= 1.1.1 in set_cipher_list()
-- File Changes --
M src/modules/tls/tls_domain.c (26)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4256.patchhttps://github.com/kamailio/kamailio/pull/4256.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4256
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4256(a)github.com>
xiaoxiongxyy created an issue (kamailio/kamailio#4292)
version:5.7.3
## Kamailio dmq related configuration:
```
loadmodule "dmq.so"
modparam("dmq", "server_address", DMQ_SIP_URL)
modparam("dmq", "server_socket", DMQ_UDP_URL)
modparam("dmq", "notification_channel", "peers")
#!ifexp POD_NAME == "kamailio-bot-xyy-0"
modparam("dmq", "notification_address", "sip:kamailio-bot-xyy-1.kamailio-bot-xyy-headless.devops.svc.bedin.bj3:5062")
#!endif
#!ifexp POD_NAME == "kamailio-bot-xyy-1"
modparam("dmq", "notification_address", "sip:kamailio-bot-xyy-0.kamailio-bot-xyy-headless.devops.svc.bedin.bj3:5062")
#!endif
modparam("dmq", "multi_notify", 1)
modparam("dmq", "num_workers", 4)
modparam("dmq", "ping_interval", 15)
# ----- htable params -----
loadmodule "htable.so"
modparam("htable", "enable_dmq", 1)
modparam("htable", "dmq_init_sync", 1)
# #!ifdef WITH_DMQ
# modparam("htable", "htable", "ipban=>size=8;autoexpire=300;dmqreplicate=1;")
# #!else
# modparam("htable", "htable", "ipban=>size=8;autoexpire=300;")
# #!endif
# ----- dialog params -----
loadmodule "dialog.so"
modparam("dialog", "db_url", DBURL)
modparam("dialog", "track_cseq_updates", 0)
modparam("dialog", "dlg_match_mode", 2)
# modparam("dialog", "timeout_avp", "$avp(i:10)")
modparam("dialog", "enable_stats", 1)
modparam("dialog", "db_mode", 2)
modparam("dialog", "dlg_flag", 9)
modparam("dialog", "enable_dmq", 1)
modparam("dialog", "db_update_period", 10)
modparam("dialog", "send_bye", 1)
modparam("dialog", "default_timeout", 3600)
modparam("dialog", "end_timeout", 60)
# usrloc params
loadmodule "dmq_usrloc.so"
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "sync", 1)
modparam("dmq_usrloc", "replicate_socket_info", 1)
modparam("dmq_usrloc", "usrloc_domain", "location")
```
## Phenomenon:
kamailio-0:

freeswitch:

The current problem is that the 180 and 200 responses are routed to another node and returned along the same route, but the node that received the invite request before cannot perceive it. I learned from the official documentation that dmq cannot replicate the response, so the current status is not synchronized, causing the first pod to send a 408 request to interrupt the session. This problem has troubled me for a month and I have no idea where to start. Please help
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4292
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4292(a)github.com>
2954456878 created an issue (kamailio/kamailio#4293)
In kamailio-6.0.x version, there are multiple http servers, such as: XHTTP MICROHTTPD NGHTTP2, which module has the best performance?
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4293
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4293(a)github.com>
jmordica created an issue (kamailio/kamailio#4179)
### Description
Kamailio crash involving rtpengine
### Troubleshooting
#### 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.
-->
```
GNU gdb (Debian 13.1-3) 13.1
Copyright (C) 2023 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:
<https://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/sbin/kamailio...
Reading symbols from /usr/lib/debug/.build-id/20/dc8be8c0aa02eba62b84db3c283789f068fb79.debug...
warning: Can't open file /dev/zero (deleted) during file-backed mapping note processing
[New LWP 37]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `kamailio -DD -E -m 8000 -M 512 -f /etc/kamailio/kamailio.cfg -P /var/run/kamail'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt full
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
tid = <optimized out>
ret = 0
pd = <optimized out>
old_mask = {__val = {0}}
ret = <optimized out>
#1 0x00007f0a2dd31f1f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
No locals.
#2 0x00007f0a2dce2fb2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#3 0x00007f0a2dccd472 in __GI_abort () at ./stdlib/abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x20, sa_sigaction = 0x20}, sa_mask = {__val = {1880844493789993498, 1880844493789993498, 1880844493789993498, 0, 0, 0, 0,
2314885530818453536, 2314885530818453536, 2314885530818453536, 2314885530818453536, 0, 0, 0, 0, 94814674008008}}, sa_flags = 365707264,
sa_restorer = 0x563bc3029320 <log_prefix_buf>}
#4 0x0000563bc2e27414 in qm_debug_check_frag (qm=qm@entry=0x7f0815cc4000, f=f@entry=0x7f0834533950, file=file@entry=0x7f0a0a93420f "rtpengine: rtpengine_hash.c", line=line@entry=528,
eline=eline@entry=546, efile=0x563bc2f6abcc "core/mem/q_malloc.c") at core/mem/q_malloc.c:132
p = <optimized out>
__func__ = "qm_debug_check_frag"
#5 0x0000563bc2e282b9 in qm_free (qmp=<optimized out>, p=0x7f0834533990, file=0x7f0a0a93420f "rtpengine: rtpengine_hash.c",
func=0x7f0a0a935040 <__func__.2> "rtpengine_hash_table_free_entry", line=528, mname=0x7f0a0a92a000 "rtpengine") at core/mem/q_malloc.c:546
qm = <optimized out>
f = 0x7f0834533950
size = <optimized out>
next = <optimized out>
prev = <optimized out>
__func__ = "qm_free"
#6 0x0000563bc2e2d51f in qm_shm_free (qmp=<optimized out>, p=0x7f0834533990, file=0x7f0a0a93420f "rtpengine: rtpengine_hash.c",
func=0x7f0a0a935040 <__func__.2> "rtpengine_hash_table_free_entry", line=528, mname=0x7f0a0a92a000 "rtpengine") at core/mem/q_malloc.c:1532
No locals.
#7 0x00007f0a0a922adb in rtpengine_hash_table_free_entry (entry=0x7f08263a3f80) at ./src/modules/rtpengine/rtpengine_hash.c:528
__func__ = "rtpengine_hash_table_free_entry"
--Type <RET> for more, q to quit, c to continue without paging--info locals
#8 0x00007f0a0a927dd4 in rtpengine_hash_table_lookup (callid=..., viabranch=..., op=op@entry=OP_OFFER) at ./src/modules/rtpengine/rtpengine_hash.c:428
entry = 0x7f08263a3f80
last_entry = 0x7f08174e0450
hash_index = 87
node = <optimized out>
__func__ = "rtpengine_hash_table_lookup"
#9 0x00007f0a0a90ec2b in select_rtpp_node_old (do_test=1, op=OP_OFFER, viabranch=..., callid=...) at ./src/modules/rtpengine/rtpengine.c:3810
node = 0x0
node = <optimized out>
__func__ = "select_rtpp_node_old"
__llevel = <optimized out>
__kld = <optimized out>
__llevel = <optimized out>
__kld = <optimized out>
#10 select_rtpp_node (callid=..., viabranch=..., queried_nodes_list=0x7f0a0de84430, queried_nodes=queried_nodes@entry=0, op=OP_OFFER, do_test=1) at ./src/modules/rtpengine/rtpengine.c:3864
node = 0x0
__func__ = "select_rtpp_node"
#11 0x00007f0a0a91228a in rtpp_function_call (bencbuf=bencbuf@entry=0x7ffeb1d5bea0, msg=msg@entry=0x7f0a0de94350, op=<optimized out>, flags_str=<optimized out>,
body_out=body_out@entry=0x7ffeb1d5be80, cl_field=cl_field@entry=0x7ffeb1d5be90) at ./src/modules/rtpengine/rtpengine.c:3178
ng_flags = {via = -1, to = 1, packetize = 0, transport = 256, directional = 0, dict = 0x7f0a0de98b78, flags = 0x7f0a0de98d08, direction = 0x7f0a0de98e68, replace = 0x7f0a0de98ec8,
rtcp_mux = 0x7f0a0de98f28, sdes = 0x7f0a0de98f88, t38 = 0x7f0a0de99098, received_from = 0x7f0a0de98e08, codec = 0x7f0a0de990f8, codec_strip = 0x0, codec_offer = 0x0,
codec_transcode = 0x0, codec_mask = 0x0, codec_set = 0x0, codec_except = 0x0, codec_accept = 0x0, codec_consume = 0x0, call_id = {
s = 0x563bc30e195f <buf+287> "5783b150-6ad4-4e55-9555-decf4048c8fb\r\nCSeq: 23471 INVITE\r\nAllow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, INFO, REFER\r\nk: replaces, histinfo\r\nX-UNIQUEI"..., len = 36}, from_tag = {
s = 0x563bc30e18fb <buf+187> "47d9d572-1f09-46bf-b966-16988c17cf56\r\nt: <sip:02-5333@10.142.0.56>\r\nm: <sip:vxm@10.52.7.2:5081>\r\ni: 5783b150-6ad4-4e55-9555-decf4048c8fb\r\nCSeq: 23471 INVITE\r\nAllow: OPTIONS, REGISTER, SUBSCRIBE, NOTIF"..., len = 36}, to_tag = {s = 0x0, len = 0}}
item = <optimized out>
resp = <optimized out>
viabranch = {s = 0x7f0a0dd15720 "z9hG4bKPje1c3efee-2490-4035-9e2e-b124ec630b820", len = 46}
body = {
s = 0x563bc30e1b33 <buf+755> "v=0\r\no=- 1936793669 1936793669 IN IP4 10.52.7.2\r\ns=VXM\r\nc=IN IP4 10.52.7.2\r\nt=0 0\r\nm=audio 18690 RTP/AVP 0 101\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-16\r\na=ptime:20\r\na=maxptime:140\r\na=sendre"..., len = 204}
--Type <RET> for more, q to quit, c to continue without paging--list
error = <optimized out>
ret = 1
queried_nodes = 0
cont_type = <optimized out>
node = <optimized out>
cp = <optimized out>
pv_val = {rs = {s = 0x7f083a53d3c0 "p", len = -1025336010}, ri = 47244640256, flags = 1}
md5 = "\004\220\361\302;V\000\000\260r\366\302;V", '\000' <repeats 11 times>, "\345\323A\270\253\205\301"
branch_buf = "\210\033\016\303;V\000\000\177W\315\302;V\000\000\216\033\016\303;V\000\000\000\345\323A\270\253\205\301\224\033\016\303;V\000\000\000\345\323A\270\253\205\301\220\201\351\r\n\177\000\000\000\345"
result = <optimized out>
t = <optimized out>
branch_idx = <optimized out>
__func__ = "rtpp_function_call"
select_node = <optimized out>
#12 0x00007f0a0a917346 in rtpp_function_call_ok (bencbuf=bencbuf@entry=0x7ffeb1d5bea0, msg=msg@entry=0x7f0a0de94350, op=<optimized out>, flags_str=<optimized out>,
body=body@entry=0x7ffeb1d5be80, cl_field=cl_field@entry=0x7ffeb1d5be90) at ./src/modules/rtpengine/rtpengine.c:3371
ret = <optimized out>
__func__ = "rtpp_function_call_ok"
#13 0x00007f0a0a919708 in rtpengine_offer_answer (msg=0x7f0a0de94350, flags=<optimized out>, op=<optimized out>, more=0) at ./src/modules/rtpengine/rtpengine.c:4495
bencbuf = {pieces = 0x7f0a0de9a270, free_list = 0x0, error = 0}
dict = <optimized out>
body = {s = 0x7f0a0de94350 "\233@\006", len = 1104405760}
newbody = <optimized out>
anchor = <optimized out>
pv_val = {rs = {s = 0x0, len = 177318755}, ri = 0, flags = 4}
cur_body = {s = 0x0, len = 0}
cl_field = {s = 0x0, len = 0}
cl_repl = {s = 0x0, len = 0}
__func__ = "rtpengine_offer_answer"
error_free = <optimized out>
#14 0x0000563bc2c77195 in sr_kemi_exec_func (ket=ket@entry=0x7f0a0a93d5c8 <sr_kemi_rtpengine_exports+72>, msg=<optimized out>, pno=pno@entry=1, vps=<optimized out>) at core/kemiexec.c:84
```
#### 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: {1 23471 INVITE 5783b150-6ad4-4e55-9555-decf4048c8fb} <core> [core/mem/q_malloc.c:148]: qm_debug_check_frag(): BUG: qm: prev. fragm. tail overwritten(c0c00a0d, abcdefed)[0x7f0834533950:0x7f0834533990]! Memory allocator was called from rtpengine: rtpengine_hash.c:528. Fragment marked by rtpengine: ../../core/parser/../ut.h:891. Exec from core/mem/q_malloc.c:546.
CRITICAL: {1 23471 INVITE 5783b150-6ad4-4e55-9555-decf4048c8fb} <core> [core/mem/q_malloc.c:156]: qm_debug_check_frag(): BUG: qm: prev. fragm. tail overwritten [0x7f08345335b0:0x7f08345335f0] - fragment marked by core: core/msg_translator.c:2305
```
#### 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).
-->
```
(paste your sip traffic here)
```
### 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.8.5 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 12.2.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`)
-->
```
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
Linux gke-us-east1-external-sip-4b67daea-x3rj 5.15.0-1020-gke #25-Ubuntu SMP Thu Oct 27 05:38:18 UTC 2022 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4179
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4179(a)github.com>
Opening this generic issue to track issues when trying to switch deb package generation to cmake:
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4053
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4053(a)github.com>
NUCLEAR-WAR created an issue (kamailio/kamailio#4291)
<!--
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.
Note that an issue report may be closed automatically after about 2 months
if there is no interest from developers or community users on pursuing it, being
considered expired. In such case, it can be reopened by writing a comment that includes
the token `/notexpired`. About two weeks before considered expired, the issue is
marked with the label `stale`, trying to notify the submitter and everyone else
that might be interested in it. To remove the label `stale`, write a comment that
includes the token `/notstale`. Also, any comment postpone the `expire` timeline,
being considered that there is interest in pursuing 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
Kamailio is sending wrong P-Associated-URI towards Application Server, when sending 3rd Party Registration:
Kamailio sends:
```
P-Associated-URI: <sip:0912584710@ims.mnc001.mcc001.3gppnetwork.org, tel:0912584710>, <sip:001010000084710@ims.mnc001.mcc001.3gppnetwork.org>
```
ABNF for the Header is (see RFC7315 Section 5.1) :
```
"P‑Associated‑URI"  HCOLON  [ p‑aso‑uri‑spec ]  *( COMMA  p‑aso‑uri‑spec )
p-aso-uri-spec =
name‑addr  *( SEMI  ai‑param )
it looks like an issue in ims_isc module, as other transactions containing this header are not affected.
```
### Troubleshooting
#### Reproduction
Using any version of Kamailio in IMS Setup ( e.g like Docker_open5gs) and enable 3rd Party registration in the associated iFC of the IMS User.
fur testing this particular issue any SIP Server could be user, as we need only to capture the 3rdPty Register only.
Start the registration process and capture the 3rdPty registration after a successful registration with the S-CSCF.
also, would it be possible to have multiple occurrence of this header for each IMPU, that will make it easy to use non complex logic to gather the IMPUs of a user from the AS.
#### Debugging Data
log is long, therefor I attached it to the issue along with a PCAP
#### 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).
-->
```
Session Initiation Protocol (SIP as raw text)
REGISTER sip:mtas.ims.mnc001.mcc001.3gppnetwork.org SIP/2.0
Via: SIP/2.0/UDP 172.22.0.20:6060;branch=z9hG4bK1f1a.2acf13e0000000000000000000000000.0
To: <sip:001010000084710@ims.mnc001.mcc001.3gppnetwork.org>
From: <sip:scscf.ims.mnc001.mcc001.3gppnetwork.org>;tag=577487a47557db6ca47545080fcdadff-3e5eb954
CSeq: 10 REGISTER
Call-ID: 60988901578cff95-50(a)172.22.0.20
Content-Length: 2374
User-Agent: Kamailio S-CSCF
Event: registration
Max-Forwards: 10
Expires: 600120
Path: <sip:scscf.ims.mnc001.mcc001.3gppnetwork.org;lr>,<sip:term@pcscf.ims.mnc001.mcc001.3gppnetwork.org;lr>
Contact: <sip:scscf.ims.mnc001.mcc001.3gppnetwork.org>
P-Visited-Network-ID: ims.mnc001.mcc001.3gppnetwork.org
P-Access-Network-Info: 3GPP-NR-TDD;utran-cell-id-3gpp=0010100000100066C000
P-Associated-URI: <sip:0912584710@ims.mnc001.mcc001.3gppnetwork.org, tel:0912584710>, <sip:001010000084710@ims.mnc001.mcc001.3gppnetwork.org>
Content-Type: message/sip
REGISTER sip:scscf.ims.mnc001.mcc001.3gppnetwork.org:6060 SIP/2.0
From: <sip:001010000084710@ims.mnc001.mcc001.3gppnetwork.org>;tag=114776405
To: <sip:001010000084710@ims.mnc001.mcc001.3gppnetwork.org>
CSeq: 114776123 REGISTER
Call-ID: 114776122_989640048(a)192.168.101.3
Via: SIP/2.0/UDP 172.22.0.19:4060;branch=z9hG4bKc18d.4d94d35bf6f42b8e538cf9d84cb693d8.0;i=1
Via: SIP/2.0/TCP 172.22.0.21;branch=z9hG4bKc18d.8969a1b752d8220823a5bd82c9199eb9.0;i=7
Via: SIP/2.0/TCP 192.168.101.3:44186;rport=42756;branch=z9hG4bK1511394995
Max-Forwards: 67
[…]Contact: <sip:3259ecc0-e957-4a46-a046-8e9cab307031@192.168.101.3:44186;alias=192.168.101.3~42756~2>;+g.3gpp.accesstype="cellular2";+sip.instance="<urn:gsma:imei:86401006-018500-0>";audio;+g.3gpp.nw-init-ussi;+g.3gpp.smsip;video;+g.3g
P-Access-Network-Info: 3GPP-NR-TDD;utran-cell-id-3gpp=0010100000100066C000
Security-Verify: ipsec-3gpp;q=0.1;prot=esp;mod=trans;spi-c=4098;spi-s=4099;port-c=5101;port-s=6101;alg=hmac-sha-1-96;ealg=null
Expires: 600000
Proxy-Require: sec-agree
Allow: INVITE,BYE,CANCEL,ACK,NOTIFY,UPDATE,PRACK,INFO,MESSAGE,OPTIONS
[…]Authorization: Digest username="001010000084710(a)ims.mnc001.mcc001.3gppnetwork.org",realm="ims.mnc001.mcc001.3gppnetwork.org",uri="sip:ims.mnc001.mcc001.3gppnetwork.org",qop=auth,nonce="ferAjDMunr0os568G1AocOd/sdY+MoAA+PTh/ISdKLo=",nc
User-Agent: Xiaomi_Redmi Note 12 5G_OS2.0.1.0.UMQEUXM
[…]Security-Client: ipsec-3gpp; alg=hmac-md5-96; ealg=des-ede3-cbc; spi-c=4176830254; spi-s=4255578078; port-c=42756; port-s=44186,ipsec-3gpp; alg=hmac-md5-96; ealg=aes-cbc; spi-c=4176830254; spi-s=4255578078; port-c=42756; port-s=44186
Content-Length: 0
Path: <sip:term@pcscf.ims.mnc001.mcc001.3gppnetwork.org;lr>
Supported: path
Require: path
P-Visited-Network-ID: ims.mnc001.mcc001.3gppnetwork.org
```
### 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`
Used in the test :
```
version: kamailio 6.1.0-dev0 (x86_64/linux) ba1369
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: ba1369
compiled on 22:21:16 Mar 18 2025 with gcc 9.4.0
[scscf.log](https://github.com/user-attachments/files/20852988/scscf.log)
[kamailio_wrong_PAU.zip](https://github.com/user-attachments/files/20852989/…
```
* **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`)
-->
```
Kamailio runs in Docker, with the following info from the container:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
Linux 2b805b1de581 6.8.0-62-generic #65-Ubuntu SMP PREEMPT_DYNAMIC Mon May 19 17:15:03 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4291
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4291(a)github.com>
### Description
After carrying out some load tests using the `Websocket` module, I noticed that sometimes the `websocket:closed` event is not triggered.
This problem seems to be particularly noticeable when the load is high and simultaneous. Example: 1000 records simultaneously.
In the tests carried out, I realized that the number of times the event is not triggered is small, in the order of [1-10]/1000.
I check that when I do a `ws.dump` I don't have any active connections, and I confirm that they are all effectively cleaned (`netstat -ano | grep 8061`).
However, the event is not triggered for some connections.
I can see this in the logs, and also when i display the content of an hash table, i'm dropping key inside `websocket:closed` event.
### Troubleshooting
The troubleshooting was simplistic, i.e. I ran the same test n times, and validated that the event was triggered for all connections, the number of `ws` connections listed by `Kamailio`, and the open connections.
#### Reproduction
To reproduce, we can use any mechanism that emulates the use of the `Websocket` module.
For example, I used the `sipexer` tool to create a `wss` connection with `Kamailio`, forcing simultaneous registrations.
Example command: `sipexer -cb -mt register -ex 60 -au <user> -ap <pass> -fuser example -fd mydomain -wso https://10.0.0.12:10000 -ruri sip:kamailio -su wss://kamailio:8061`
Kamailio TLS listener:
`listen=tls:10.0.0.12:8061 advertise PUBLIC_IP`
Websocket module:
```
loadmodule "websocket.so"
tcp_accept_no_cl=yes
```
```
event_route[websocket:closed] {
xlog("L_NOTICE", "WebSocket connection closed $proto:$si:$sp\n");
<I also delete where a htable key>
}
```
#### Debugging Data
```
[root@ ~]$ prcmd ws.dump
{
connections: {
}
info: {
wscounter: 0
truncated: no
}
}
[root@ ~]$ netstat -ano | grep 8061
tcp 0 0 10.0.0.12:8061 0.0.0.0:* LISTEN off (0.00/0/0)
[root ~]$ prcmd htable.dump wsauth | grep "name" | wc -l
3
[root ~]$ cat /var/log/kamailio.log | grep "WebSocket connection closed" | wc -l
997
[root ~]$ cat /var/log/proxy-registrar/proxy-registrar.log | grep "ERR" | grep "WAR" | wc -l
0
```
#### Log Messages
Nothing relevant.
#### SIP Traffic
Nothing relevant here, the SIP Flow is OK.
### Additional Information
```
version: kamailio 5.6.4 (x86_64/linux) a004cf-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
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: a004cf -dirty
compiled on 23:17:27 Jun 7 2024 with gcc 4.8.5
```
* **Operating System**:
```
CentOS Linux release 7.9.2009 (Core)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3950
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3950(a)github.com>