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/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.
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/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>
#### 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)
- [x] New feature (non-breaking change which adds new functionality)
- [x] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to issue #3929
#### Description
The handling of the buffer and pointers in the siputils/chargingvector.c module was inconsistent and led to writing directly in the sip msg buffer, which resulted in the destruction of the SIP message as reported in the issue. During the testing more cases showed up where the PCV handling became ugly and inconsistent, especially in fault scenarios. Therefore more parts have been rewritten to account for those scenarios.
The $pcv(status) pseudo-variable has been added to reflect the state of the P-Charging-Vector in the message, whether it was parsed, had errors (no body or no icid-value), has been deleted or if none is there.
The sip_p_charging_vector() function returns a status value of what it has done, or if it was a no-op call.
A present PCV can only be generated once by the module, either after an explicit deletion or by a forced replacement. After that the call returns with no-op.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3994
-- Commit Summary --
* siputils: bug fix for sip_p_charging_vector
* siputils/doc: updated pcv documentation [skip ci]
-- File Changes --
M src/modules/siputils/chargingvector.c (346)
M src/modules/siputils/doc/siputils.xml (8)
M src/modules/siputils/doc/siputils_admin.xml (50)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3994.patchhttps://github.com/kamailio/kamailio/pull/3994.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3994
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3994(a)github.com>
Module: kamailio
Branch: master
Commit: d7c8bc5c58f672004894733d0e6d2a7cb00efe7a
URL: https://github.com/kamailio/kamailio/commit/d7c8bc5c58f672004894733d0e6d2a7…
Author: Eik Rentzow <rentzow(a)gmx.de>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-10-15T13:48:35+02:00
siputils: bug fix for sip_p_charging_vector
- Bug fix for #3929 and further improvements.
- New buffer usage for P-Charging-Vector handling.
- Added $pcv(status) pseudo-var.
- Added return values for sip_p_charging_vector().
- Much improved error case handling.
- Use send interface for icid-genearted-at:
The icid-generated-at parameter should carry the ip adress of the
egress interface and not of the interface where the message was received.
This is in accordance with other SBC solutions.
---
Modified: src/modules/siputils/chargingvector.c
---
Diff: https://github.com/kamailio/kamailio/commit/d7c8bc5c58f672004894733d0e6d2a7…
Patch: https://github.com/kamailio/kamailio/commit/d7c8bc5c58f672004894733d0e6d2a7…