<!-- 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, ...)
- [ ] 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)
- [x] 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
- [x] Related to issue [reported in lists](https://lists.kamailio.org/mailman3/hyperkitty/list/sr-users@lists.k…
#### Description
<!-- Describe your changes in detail -->
This PR aims to fix a bug/security issue where data that was supposed to be encrypted and transferred through TLS, were transferred instead with TCP protocol.
More information and how to replicate can be found in the above [issue](https://lists.kamailio.org/mailman3/hyperkitty/list/sr-users@lists.k… in list.
This PR suggests using also the protocol to match if a TCP connection exists, and when doing connection lookups, otherwise, it might return a wrong connection, ie a TCP one when we are asking for a TLS one (a case when source ip/port and dest IP are same but dest port is set 0 (wildcard) ).
`tcpconn_get` was left unchanged due to being used by some modules and not wanting to break them. Please advise whether it should be beneficial to also change it.
In some cases like, `tcpconn_add_alias` and `tcpconn_get` we used the `PROTO_NONE` which preserves the original behavior. `tcpconn_add_alias` we do have the protocol available, should it be also used?
`tcpconn_get` does not have the protocol available unless we pass it as an argument.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3810
-- Commit Summary --
* tcp_main: Add protocol argument for searching tcp/tls connections
* tcp_main: Add proto argument to tcpconn_exists function
* tcp_main: Update comment docs
* core/forward: Match protocol when forwarding
* tcp_main: Match wss protocol
-- File Changes --
M src/core/forward.h (3)
M src/core/tcp_conn.h (3)
M src/core/tcp_main.c (43)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3810.patchhttps://github.com/kamailio/kamailio/pull/3810.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3810
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3810(a)github.com>
<!--
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
If Deregistration contains * in a contact field as described in RFC-3261,
then the Kamailio is not cleaning the in-memory and database record. And the next iteration is not working correctly.
Use of the "*" Contact header field value allows a registering UA
to remove all bindings associated with an address-of-record
without knowing their precise values.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
Step:1 REGISTER USER UE-A
Step:2: Wait for the certain duration
Step:3: De-REGISTER USER UE-A (Contact header is using *)
Step:4: Repeat from the step-1
After step:3, clean-up is not happening. Record can be seen in SQL.
Note: If de-register contains specific CONTACT header, then cleanup is happening.
### 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).
-->
```
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: DEBUG: <script>: Contact headervalue: *
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=25 a=63 n=assign
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=26 a=26 n=xlog
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: DEBUG: <script>: Full URI from sip:49404965200004@open-ims.test: sip:49404965200004@open-ims.test
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=33 a=63 n=assign
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=34 a=63 n=assign
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=36 a=63 n=assign
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=37 a=26 n=xlog
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=38 a=63 n=assign
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=39 a=26 n=xlog
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=46 a=16 n=if
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=43 a=26 n=xlog
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=54 a=16 n=if
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=46 a=25 n=is_present_hf
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=47 a=26 n=xlog
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=50 a=25 n=append_hf
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=54 a=26 n=xlog
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=55 a=25 n=pcscf_save_pending
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: ims_registrar_pcscf [save.c:318]: save_pending(): No contact headers
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: DEBUG: ims_registrar_pcscf [save.c:492]: save_pending(): Error saving pending contact
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=67 a=16 n=if
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=65 a=63 n=assign
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[] c=[] l=0 a=12 n=seturi
May 13 19:47:22 openims-tvmcfg-node-focal pcscf/pcscf[35816]: ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[REGISTER] c=[/usr/local/etc/kamailio/pcscf/route/register.cfg] l=71 a=26 n=xlog
```
#### 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`
```
kamailio -v
version: kamailio 5.7.5 (x86_64/linux) 58499a-dirty
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_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 58499a -dirty
compiled on 11:23:55 May 8 2024 with gcc 9.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 `lsb_release -a` and `uname -a`)
-->
```
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3848
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3848(a)github.com>
<!--
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.
-->
Hello, when I was testing the SMSC SMS business, I found that the SMS could not be forwarded by the SMSC when the characters were too long, approximately 117 characters. The issue was traced back to the smsops module, which has a limit on the length of the SMS, but it seems that it does not handle SMS segmentation. The error message returned is as follows. Could you please provide some suggestions and help?
### 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
```
2024-04-24T05:59:01.837950514Z 3(24) ERROR: <script>: SMS for "" (Valid: 0 )
2024-04-24T05:59:14.466167796Z 2(23) ERROR: <script>: 3GPP-SMS: MESSAGE (sip:+8618107550088@ims.mnc011.mcc460.3gppnetwork.org (172.22.0.20:6060) to tel:+8613800138000, bnecb4LQJ(a)10.46.2.1)
2024-04-24T05:59:14.466173859Z 2(23) ERROR: smsops [smsops_impl.c:1055]: decode_3gpp_sms(): Length of TP-User-Data payload exceeds maximum length!
2024-04-24T05:59:14.466175929Z 2(23) ERROR: smsops [smsops_impl.c:1320]: pv_get_sms(): Error getting/decoding RP-Data from request!
2024-04-24T05:59:14.466191554Z 2(23) ERROR: smsops [smsops_impl.c:1055]: decode_3gpp_sms(): Length of TP-User-Data payload exceeds maximum length!
2024-04-24T05:59:14.466194545Z 2(23) ERROR: smsops [smsops_impl.c:1320]: pv_get_sms(): Error getting/decoding RP-Data from request!
2024-04-24T05:59:14.466196517Z 2(23) ERROR: smsops [smsops_impl.c:1055]: decode_3gpp_sms(): Length of TP-User-Data payload exceeds maximum length!
2024-04-24T05:59:14.466198406Z 2(23) ERROR: smsops [smsops_impl.c:1320]: pv_get_sms(): Error getting/decoding RP-Data from request!
2024-04-24T05:59:14.466200311Z 2(23) ERROR: <script>: SMS for "" (Valid: )
2024-04-24T05:59:14.466255812Z 2(23) ERROR: smsops [smsops_impl.c:1055]: decode_3gpp_sms(): Length of TP-User-Data payload exceeds maximum length!
2024-04-24T05:59:14.466276249Z 2(23) ERROR: smsops [smsops_impl.c:1903]: isRPDATA(): Error getting/decoding RP-Data from request!
```
#### 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).
-->
```
```
![image](https://github.com/kamailio/kamailio/assets/152272255/808e65ce-9763-4056-9924-77122f6d9c25)
### 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`
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 4fb8ac -dirty
compiled on 03:11:49 Apr 24 2024 with gcc 9.4.0
```
version: kamailio 5.9.0-dev0 (x86_64/linux) 4fb8ac-dirty
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
```
* **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`)
-->
```
Linux sder 4.15.0-128-generic #131-Ubuntu SMP Wed Dec 9 06:57:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3822
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3822(a)github.com>
#### Pre-Submission Checklist
- [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:
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
Adding support for converting unsigned integers from database tables into kamailio pseudo variables usable in the routing config.
This is quite useful when pulling `int unsigned` fields from a database, in modules that support "extra fields" in their module parameters.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3828
-- Commit Summary --
* permissions: fixup uint support in address table reload
* htable: add uint support when packing an htable
* lib/srdb1: add uint support for db->pv conversions
-- File Changes --
M src/lib/srdb1/db_ut.c (4)
M src/modules/htable/ht_db.c (6)
M src/modules/permissions/address.c (35)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3828.patchhttps://github.com/kamailio/kamailio/pull/3828.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3828
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3828(a)github.com>
Hi
there is an issue with the SIP parser for the t_uac_send function
https://www.kamailio.org/docs/modules/devel/modules/tm.html#tm.f.t_uac_send
If I call this function for example:
t_uac_send("INVITE", "sip:test@123.123.123.123:5060", "", "" ,"Content-Type: text/plain\r\nContact: <sip:85951b3d-096c-95d6-5f05-4f38095aca9f@172.17.64.120:5060;transport=tcp>;+u.sip!devicename.ccm.cisco.com=\"SEP5486BC7F2BBC\"", "Testbody")
Then the resulting request is broken - it's probably due to a character (exclamation mark?) in the Contact header.... I tested it with a call from kemi, but it probably also occurs when you run it with a normal kamailio -script tests
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3682
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3682(a)github.com>
### Description
Calling functions from the `dialplan` module in 5.8 (`dp_translate()`, `dp_match()`) results in the following line being logged:
```
WARNING: <core> [core/mem/q_malloc.c:520]: qm_free(): WARNING: free(0) called from dialplan: dp_db.c: pcre2_free(206)
```
Is this a functional problem, or just a case of overly aggressive logging?
### Troubleshooting
#### Reproduction
Reproducible with the following kamailio config:
```
#!KAMAILIO
loadmodule "pv"
loadmodule "db_sqlite"
loadmodule "xlog"
loadmodule "dialplan"
disable_tcp = true
force_rport = true
!!define DBFILE /etc/kamailio/kamailio.sqlite
modparamx("db_sqlite","db_set_readonly", "$def(DBFILE)")
modparamx("dialplan","db_url", "sqlite:///$def(DBFILE)")
modparam("dialplan", "attrs_pvar", "$avp(dp_attrs)")
request_route {
if ( $rm == "ACK" ) {
exit;
}
xinfo("$ci New request\n");
dp_match("1", "$rU");
exit;
}
```
The warning log is issued in 5.8 but not 5.7. Reproduced by sending a request with SIPp:
```
sipp -sn uac -m 1 -s 15554445555 localhost
```
### Possible Solutions
Not sure if this is just a case of logging being overly aggressive, or an issue with the module's memory management.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.8.1 (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
```
Tested using docker `debian:12-slim` using the official packages from `http://deb.kamailio.org/kamailio58`
* **Operating System**:
Docker debian:12-slim, but also observed in Alpine Linux/
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3851
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3851(a)github.com>
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>
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>