<!-- 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, …
[View More]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
- [X] Related to issue #3297
#### Description
<!-- Describe your changes in detail -->
The setup is a kamailio with no available rtpengine. (e.g. has a list with rtpengine urls but those are not reachable)
Recently had a crash similar to #3297, but in an outdated kamailio version (5.5.7). Tried to reproduce this in 5.5.7 and 5.8.3 but could not crash any of them. However I managed to get the logs similar to ones right before the crash happened:
```
2024-10-04T17:39:58.026206+03:00 kamailio[450237]: ERROR: {1 1 INVITE 203-450290(a)192.168.100.93} <core> [core/action.c:1595]: run_actions(): alert - action [corefunc (16)] cfg [/home/stefan/kamailio.cfg:625] took too long [29310906 us]
```
...directly related to how much rtpengine_manage() function took to execute. So routing of SIP is delayed by that ammount.
Tracked this in code, down to where this lock is get, when "aggressive_redetection" modparam is enabled: https://github.com/kamailio/kamailio/blob/66fe6eb71e58a02222d1a2fb00f9a0cdb…
I will double check that part of the code, since I don't think a lock get is necessary. It only updates a value inside a node, inside the list of nodes, but not changes the list links at all. (this in another PR)
For now I propose to disable this aggressive_redetection mechanism by default. Since it delays the SIP routing logic when no rtpengines available (and in some cases lead to crashes in transaction module).
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3992
-- Commit Summary --
* rtpengine: disable aggressive redetection by default
-- File Changes --
M src/modules/rtpengine/config.c (2)
M src/modules/rtpengine/doc/rtpengine_admin.xml (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3992.patchhttps://github.com/kamailio/kamailio/pull/3992.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3992
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3992(a)github.com>
[View Less]
<!-- 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, …
[View More]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
- Enable `app_python3s` module to build with Free Threading CPython builds
- Can be gated with `-DKSR_PYTHON_DISABLE_FREETHREADING`
- If Python is a non-free-threading build this change has no effect
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3987
-- Commit Summary --
* app_python3s: initial support for free-threading Python
-- File Changes --
M src/modules/app_python3s/apy3s_kemi.c (5)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3987.patchhttps://github.com/kamailio/kamailio/pull/3987.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3987
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3987(a)github.com>
[View Less]
Running compiled Kamailio 5.8.1 (previously 5.8.0) on Debian 12 64-bit
We're seeing an issue with UDP endpoints (this issue does not happen with TCP and TLS) where usrloc will not send OPTIONS packet keepalives.
Here are all of our usrloc parameters:
modparam("usrloc", "db_mode", 0)
modparam("usrloc", "ka_domain", "SIPDOMAIN") #-- SIPDOMAIN is a fqdn
modparam("usrloc", "ka_from", "sip:proxy-ping@SIPDOMAIN")
modparam("usrloc", "ka_mode", 1)
modparam("usrloc", "timer_interval", 20) #-- How …
[View More]often to qualify endpoints and clean mem tables?
modparam("usrloc", "timer_procs", 4)
modparam("usrloc", "ka_randomize", 10)
modparam("usrloc", "use_domain", 0)
modparam("usrloc", "server_id_filter", 1)
modparam("usrloc", "ka_filter", 0)
modparam("usrloc", "ka_timeout", 60) #-- How quickly to expire a contact if it does not reply to keepalive?
modparam("usrloc", "matching_mode", 0)
modparam("usrloc", "handle_lost_tcp", 1)
modparam("usrloc", "close_expired_tcp", 1)
modparam("usrloc", "desc_time_order", 1)
modparam("usrloc", "hash_size", 14)
It seems usrloc is not actually using timer_interval at all for UDP devices. However, it does seem to be sending OPTIONS every 20 seconds on TCP/TLS. (this is confirmed via packet capture on a SIP phone).
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3844
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3844(a)github.com>
[View Less]
Module: kamailio
Branch: master
Commit: cce29af41120cf30c4c22979e772d1ca666408c6
URL: https://github.com/kamailio/kamailio/commit/cce29af41120cf30c4c22979e772d1c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-10-16T11:46:37+02:00
async: docs updates for async_sleep()
---
Modified: src/modules/async/doc/async_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/…
[View More]cce29af41120cf30c4c22979e772d1c…
Patch: https://github.com/kamailio/kamailio/commit/cce29af41120cf30c4c22979e772d1c…
---
diff --git a/src/modules/async/doc/async_admin.xml b/src/modules/async/doc/async_admin.xml
index 027cea11ed7..152c6be5db7 100644
--- a/src/modules/async/doc/async_admin.xml
+++ b/src/modules/async/doc/async_admin.xml
@@ -234,8 +234,11 @@ route[RESUME] {
</title>
<para>
Simulate a sleep of 'seconds' and then continue the processing of SIP
- request with the next action. In case of internal errors, the function
- returns false.
+ request with the next action. Note that the processing continues till
+ the last action in the current route block. Consider using async_route()
+ instead if you want to control better what is executed after the wait
+ time. Beacuse the execution is resumed in another process, do not use
+ private memory variables before and after the async sleep.
</para>
<para>
The sleep parameter represent the number of seconds to suspend the
@@ -243,6 +246,9 @@ route[RESUME] {
a static integer or a variable holding an integer.
</para>
<para>
+ In case of internal errors, the function returns false.
+ </para>
+ <para>
This function can be used from REQUEST_ROUTE.
</para>
<example>
@@ -262,15 +268,13 @@ exit;
<function moreinfo="none">async_ms_sleep(milliseconds)</function>
</title>
<para>
- Simulate a sleep of 'milliseconds' and then continue the processing of SIP
- request with the next action. In case of internal errors, the function
- returns false.
- This function works only if the ms_timer parameter has a value greater than 0.
+ Similar to async_sleep(), but with a 'milliseconds' parameter. This
+ function works only if the ms_timer parameter has a value greater than 0.
</para>
<para>
The sleep parameter represent the number of milliseconds to suspend the
- processing of SIP request. Maximum value is 30000 (30 sec). The parameter can be
- a static integer or a variable holding an integer.
+ processing of SIP request. Maximum value is 30000 (30 sec). The parameter
+ can be a static integer or a variable holding an integer.
</para>
<para>
This function can be used from REQUEST_ROUTE.
[View Less]
Module: kamailio
Branch: master
Commit: e18c52030e202716df9f5e8e953c19fb4a9c65e2
URL: https://github.com/kamailio/kamailio/commit/e18c52030e202716df9f5e8e953c19f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-10-16T11:05:04+02:00
tls: docs - relocate overview notes to Important Notes section
---
Modified: src/modules/tls/doc/tls.xml
---
Diff: https://github.com/kamailio/kamailio/commit/…
[View More]e18c52030e202716df9f5e8e953c19f…
Patch: https://github.com/kamailio/kamailio/commit/e18c52030e202716df9f5e8e953c19f…
---
diff --git a/src/modules/tls/doc/tls.xml b/src/modules/tls/doc/tls.xml
index 3a0416fed61..53397e2d50a 100644
--- a/src/modules/tls/doc/tls.xml
+++ b/src/modules/tls/doc/tls.xml
@@ -60,27 +60,9 @@
must be added to the Kamailio config file.
</para>
<para>
- IMPORTANT: the tls module must be loaded before any other &kamailio; module
- that uses libssl (OpenSSL library). A safe option is to have the tls module
- loaded first (be in the first "loadmodule" in &kamailio;.cfg).
- </para>
- <para>
- IMPORTANT: For libssl v3.x, the core parameter "tls_threads_mode"
- has to be set, see the Core Cookbook for possible values.
- </para>
- <para>
- IMPORTANT: using this module compiled with newer versions of libssl
- (e.g., v1.1+) may require &kamailio; to be started with
- <emphasis>--atexit=no</emphasis> command line parameters to avoid
- calling C atexit callbacks inside the process ending during
- daemonize procedure as well as during shut down, which can lead
- to crashes because it destroys and then accesses shared memory. For
- example, such case has been reported for Ubuntu 20.04 or RedHat 8.
- </para>
- <para>
- Note: with some particular combination of OS, openssl and mysql-client
- libraries, there were reports of random crashes, in such case try to set
- the db_mysql module parameter opt_ssl_mode to 1.
+ Read the "Important Notes" section because it has relevant information
+ about configuring properly the module for various libssl versions,
+ components and operating systems.
</para>
</section>
<section id="tls.quick_start">
@@ -134,7 +116,7 @@ request_route {
<para>
The TLS module needs some special options enabled when compiling
Kamailio. These options are enabled by default, however in case
- you're using a modified Kamailio version or Makefile, make sure
+ you are using a modified Kamailio version or Makefile, make sure
that you enable -DUSE_TLS and -DTLS_HOOKS (or compile with make
TLS_HOOKS=1 which will take care of both options).
</para>
@@ -188,6 +170,29 @@ request_route {
</itemizedlist>
The bug reports can be viewed at <ulink url="http://rt.openssl.org/">http://rt.openssl.org/</ulink>.
</para>
+ <para>
+ Note 1: the tls module must be loaded before any other &kamailio; module
+ that uses libssl (OpenSSL library). A safe option is to have the tls module
+ loaded first (be in the first "loadmodule" in &kamailio;.cfg).
+ </para>
+ <para>
+ Note 2: for libssl v3.x, the core parameter "tls_threads_mode"
+ has to be set, see the Core Cookbook for possible values.
+ </para>
+ <para>
+ Note 3: using this module compiled with newer versions of libssl
+ (e.g., v1.1+) may require &kamailio; to be started with
+ <emphasis>--atexit=no</emphasis> command line parameters to avoid
+ calling C atexit callbacks inside the process ending during
+ daemonize procedure as well as during shut down, which can lead
+ to crashes because it destroys and then accesses shared memory. For
+ example, such case has been reported for Ubuntu 20.04 or RedHat 8.
+ </para>
+ <para>
+ Note 4: with some particular combination of OS, openssl and mysql-client
+ libraries, there were reports of random crashes, in such case try to set
+ the db_mysql module parameter opt_ssl_mode to 1.
+ </para>
</section>
[View Less]