Module: kamailio
Branch: master
Commit: ba0c570ca95bff06c8ce04779371567d88a4e9f8
URL: https://github.com/kamailio/kamailio/commit/ba0c570ca95bff06c8ce04779371567…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2024-12-09T09:46:10+01:00
modules: readme files regenerated - tm ... [skip ci]
---
Modified: src/modules/tm/README
---
Diff: https://github.com/kamailio/kamailio/commit/ba0c570ca95bff06c8ce04779371567…
Patch: https://github.com/kamailio/kamailio/commit/ba0c570ca95bff06c8ce04779371567…
---
diff --git a/src/modules/tm/README b/src/modules/tm/README
index 06ee1beb53b..12a030cc19d 100644
--- a/src/modules/tm/README
+++ b/src/modules/tm/README
@@ -1294,16 +1294,17 @@ Note
See also: t_set_fr(), fr_timer.
- In Kamailio compatibility mode (defined by #!KAMAILIO), the value of
- the parameter must be the name of an AVP in pseudo-variable format:
- $avp(name). In SER compatibility mode it must be just AVP name.
+ In Kamailio compatibility mode (defined by #!KAMAILIO, which is
+ default), the value of the parameter must be the name of an AVP in
+ pseudo-variable format: $avp(name). In SER compatibility mode (defined
+ by #!SER) it must be just AVP name.
Example 1.28. Set fr_timer_avp parameter
...
-# Kamailio mode
-modparam("tm", "fr_timer_avp", "$avp(i:708)")
-# Old SER mode
-modparam("tm", "fr_timer_avp", "i:708")
+# default Kamailio compatibility mode
+modparam("tm", "fr_timer_avp", "$avp(frtimer)")
+# old SER compatibility mode
+modparam("tm", "fr_timer_avp", "frtimer")
...
3.28. fr_inv_timer_avp (string)
@@ -1328,15 +1329,16 @@ Note
See also: t_set_fr(), fr_inv_timer.
- In Kamailio compatibility mode (defined by #!KAMAILIO), the value of
- the parameter must be the name of an AVP in pseudo-variable format:
- $avp(name). In SER compatibility mode it must by just AVP name.
+ In Kamailio compatibility mode (defined by #!KAMAILIO, which is
+ default), the value of the parameter must be the name of an AVP in
+ pseudo-variable format: $avp(name). In SER compatibility mode (defined
+ by #!SER) it must by just AVP name.
Example 1.29. Set fr_inv_timer_avp parameter
...
-# Kamailio mode
+# Kamailio compatibility mode
modparam("tm", "fr_inv_timer_avp", "$avp(my_fr_inv_timer)")
-# Old SER mode
+# old SER compatibility mode
modparam("tm", "fr_inv_timer_avp", "my_fr_inv_timer")
...
Module: kamailio
Branch: master
Commit: 5e0bc1a5c9764ce472354a0aa242b7469d79eb7f
URL: https://github.com/kamailio/kamailio/commit/5e0bc1a5c9764ce472354a0aa242b74…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-12-09T09:28:50+01:00
tm: small updates about timer avp params and compatibility modes
---
Modified: src/modules/tm/doc/params.xml
---
Diff: https://github.com/kamailio/kamailio/commit/5e0bc1a5c9764ce472354a0aa242b74…
Patch: https://github.com/kamailio/kamailio/commit/5e0bc1a5c9764ce472354a0aa242b74…
---
diff --git a/src/modules/tm/doc/params.xml b/src/modules/tm/doc/params.xml
index ecff467fa06..ad1f55e2061 100644
--- a/src/modules/tm/doc/params.xml
+++ b/src/modules/tm/doc/params.xml
@@ -825,19 +825,19 @@ modparam("tm", "contact_flows_avp", "tm_contact_flows")
<varname>fr_timer</varname>.
</para>
<para>
- In Kamailio compatibility mode (defined by #!KAMAILIO), the value
- of the parameter must be the name of an AVP in pseudo-variable
- format: $avp(name). In SER compatibility mode it must be just
- AVP name.
+ In Kamailio compatibility mode (defined by #!KAMAILIO, which is
+ default), the value of the parameter must be the name of an AVP
+ in pseudo-variable format: $avp(name). In SER compatibility mode
+ (defined by #!SER) it must be just AVP name.
</para>
<example>
<title>Set <varname>fr_timer_avp</varname> parameter</title>
<programlisting>
...
-# Kamailio mode
-modparam("tm", "fr_timer_avp", "$avp(i:708)")
-# Old SER mode
-modparam("tm", "fr_timer_avp", "i:708")
+# default Kamailio compatibility mode
+modparam("tm", "fr_timer_avp", "$avp(frtimer)")
+# old SER compatibility mode
+modparam("tm", "fr_timer_avp", "frtimer")
...
</programlisting>
</example>
@@ -871,18 +871,18 @@ modparam("tm", "fr_timer_avp", "i:708")
<varname>fr_inv_timer</varname>.
</para>
<para>
- In Kamailio compatibility mode (defined by #!KAMAILIO), the value
- of the parameter must be the name of an AVP in pseudo-variable
- format: $avp(name). In SER compatibility mode it must by just
- AVP name.
+ In Kamailio compatibility mode (defined by #!KAMAILIO, which is
+ default), the value of the parameter must be the name of an AVP
+ in pseudo-variable format: $avp(name). In SER compatibility mode
+ (defined by #!SER) it must by just AVP name.
</para>
<example>
<title>Set <varname>fr_inv_timer_avp</varname> parameter</title>
<programlisting>
...
-# Kamailio mode
+# Kamailio compatibility mode
modparam("tm", "fr_inv_timer_avp", "$avp(my_fr_inv_timer)")
-# Old SER mode
+# old SER compatibility mode
modparam("tm", "fr_inv_timer_avp", "my_fr_inv_timer")
...
</programlisting>
### Description
We are using Kamailio 5.7.4 on Debian 12 (from http://deb.kamailio.org/kamailio57) with rtpengine as an Edgeproxy for our clients. The instance terminates SIP/TLS (with Cliencertificates) and forwards the SIP Traffic to internal systems.
After some days we are getting errors like this
`tls_complete_init(): tls: ssl bug #1491 workaround: not enough memory for safe operation: shm=7318616 threshold1=8912896`
First we thought Kamailio just doesnt have enough memory, so we doubled it..
But after some days the Logmessage (and Userissues) occured again.
So we monitored the shmmem statistics and found that used and max_used are constantly growing til it reaches the limit.
As i mentioned we are using client-certificates and so we are also using the CRL feature.
We do have a systemd-timer which fetches the CRL every hour and runs 'kamcmd tls.reload' when finished.
Our tls.cfg looks like this:
```
[server:default]
method = TLSv1.2+
private_key = /etc/letsencrypt/live/hostname.de/privkey.pem
certificate = /etc/letsencrypt/live/hostname.de/fullchain.pem
ca_list = /etc/kamailio/ca_list.pem
ca_path = /etc/kamailio/ca_list.pem
crl = /etc/kamailio/combined.crl.pem
verify_certificate = yes
require_certificate = yes
[client:default]
verify_certificate = yes
require_certificate = yes
```
After testing a bit we found that every time tls.reload is executed Kamailio consumes a bit more memory which eventually leads to all the memory being consumed which leads to issues for our users.
See following example:
```
[0][root@edgar-dev:~]# while true ; do /usr/sbin/kamcmd tls.reload ; /usr/sbin/kamcmd core.shmmem ; sleep 1 ; done
Ok. TLS configuration reloaded.
{
total: 268435456
free: 223001520
used: 41352552
real_used: 45433936
max_used: 45445968
fragments: 73
}
Ok. TLS configuration reloaded.
{
total: 268435456
free: 222377960
used: 41975592
real_used: 46057496
max_used: 46069232
fragments: 78
}
Ok. TLS configuration reloaded.
{
total: 268435456
free: 221748664
used: 42604992
real_used: 46686792
max_used: 46698080
fragments: 77
}
Ok. TLS configuration reloaded.
{
total: 268435456
free: 221110832
used: 43242408
real_used: 47324624
max_used: 47335608
fragments: 81
}
^C
[130][root@edgar-dev:~]#
```
### Troubleshooting
#### Reproduction
Everytime tls.reload is called the memory consumptions grows..
#### 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.
-->
```
If you let me know what would be interesting for tracking this down, i am happy to provide logs/debugging data!
```
#### 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).
-->
```
If you let me know what would be interesting for tracking this down, i am happy to provide logs/debugging data!
```
#### SIP Traffic
SIP doesnt seem to be relevant here
### Possible Solutions
Calling tls.reload less often or restart kamailio before memory is consumed ;)
### Additional Information
```
version: kamailio 5.7.4 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, 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: unknown
compiled with gcc 12.2.0
```
* **Operating System**:
```
* Debian GNU/Linux 12 (bookworm)
* Linux edgar-dev 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3823
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3823(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
- [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:
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
As a local IP address for TCP sending operation the Kamailio service is taking the same network_interface/IP_address, which is used by the service for TCP listening.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3925
-- Commit Summary --
* core: local TCP socket is bound on listening address
-- File Changes --
M src/core/tcp_main.c (24)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3925.patchhttps://github.com/kamailio/kamailio/pull/3925.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3925
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3925(a)github.com>
### Description
Hi, I am migrating a kamailio application from RHEL 7 / KAM 5.0 to RHEL 8 / KAM 5.5
kamailio installed from repo baseurl=https://rpm.kamailio.org/centos/...
Thanks for your return
### Troubleshooting
general protection fault
#### Reproduction
Each time an INVITE is received
#### Debugging Data
Core was generated by `/usr/sbin/kamailio --atexit=no -DD -P /run/kamailio/kamailio.pid -f /etc/kamail'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00000000006e2be9 in qm_debug_check_frag ()
Missing separate debuginfos, use: yum debuginfo-install glibc-2.28-225.el8_8.6.x86_64 libblkid-2.32.1-42.el8_8.x86_64 libgcc-8.5.0-18.el8.x86_64 libmount-2.32.1-42.el8_8.x86_64 libselinux-2.9-8.el8.x86_64 libxcrypt-4.1.1-6.el8.x86_64 mariadb-connector-c-3.1.11-2.el8_3.x86_64 openssl-libs-1.1.1k-9.el8_7.x86_64 pcre2-10.32-3.el8_6.x86_64 perl-libs-5.26.3-422.el8.x86_64 systemd-libs-239-74.el8_8.5.x86_64 zlib-1.2.11-21.el8_7.x86_64
(gdb) bt
#0 0x00000000006e2be9 in qm_debug_check_frag ()
#1 0x00000000006e6dba in qm_free ()
#2 0x00000000006f13c9 in qm_shm_free ()
#3 0x00000000005e8a2f in xavp_free ()
#4 0x00000000005e9ed8 in xavp_destroy_list ()
#5 0x00000000005e9f4f in xavp_reset_list ()
#6 0x00000000005ff6a1 in ksr_msg_env_reset ()
#7 0x00000000005fefb4 in receive_msg ()
#8 0x00000000004ddb1a in udp_rcv_loop ()
#9 0x000000000042bf00 in main_loop ()
#10 0x0000000000437c69 in main ()
(gdb) info locals
No symbol table info available.
(gdb) list
1 dl-call-libc-early-init.c: No such file or directory.
#### Log Messages
Nothing in Syslog
#### 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
version: kamailio 5.5.7 (x86_64/linux) 43eb13
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: 43eb13
compiled on 13:39:01 Jul 19 2023 with gcc 8.5.0
* **Operating System**:
RHEL 8.8
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4057
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4057(a)github.com>
if (is_method("CANCEL")) {
xlog("L_INFO", "Received CANCEL request for $ci - Method: $rm - R-URI: $ru\n");
if (!t_check_trans()) {
xlog("L_INFO", "No transaction found with t_check_trans(), trying t_lookup_cancel()\n");
# Try to find the transaction using branch and Call-ID
$var(branch) = $(hdr(Via){param.value,branch});
if (!t_lookup_cancel()) {
xlog("L_WARN", "No transaction found for CANCEL - $ci with branch $var(branch)\n");
sl_reply("481", "Call Leg/Transaction Does Not Exist");
exit;
}
xlog("L_INFO", "Found transaction using t_lookup_cancel()\n");
}
# Extract destination from original request
if ($ru != "") {
$du = $ru;
xlog("L_INFO", "Setting destination from R-URI: $du\n");
} else {
xlog("L_WARN", "No R-URI found for CANCEL\n");
}
# Add debugging
xlog("L_INFO", "Forwarding CANCEL to $du for call $ci\n");
if (ds_is_from_list()) {
ds_load_unset();
xlog("L_INFO", "Unset dispatcher load for destination\n");
}
# Handle the client ID and call counting
if (is_present_hf("X-VICIdial-Client-Id")) {
$var(client_id) = $(hdr(X-VICIdial-Client-Id));
if ($var(client_id) =~ "^(CID_[0-9]+)-[a-z]$") {
$var(parent_id) = $(var(client_id){re.subst,/^(CID_[0-9]+)-[a-z]$/\1/});
} else {
$var(parent_id) = $var(client_id);
}
if($var(parent_id) != $null) {
lock("calls_$var(parent_id)");
if($sht(clientCalls=>$var(parent_id)) > 0) {
$sht(clientCalls=>$var(parent_id)) = $sht(clientCalls=>$var(parent_id)) - 1;
xlog("L_INFO", "CANCEL: Decremented call count for $var(parent_id) to $sht(clientCalls=>$var(parent_id))\n");
}
unlock("calls_$var(parent_id)");
}
}
# Send 200 OK response for the CANCEL
t_reply("200", "OK");
# Force the relay of CANCEL to the destination
t_relay();
exit;
} "This is my cancel route. It either forwards or relays the cancel message to the destination and also provides an error."
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4060
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4060(a)github.com>