Module: kamailio
Branch: master
Commit: 10292cf151bd4d0ab9d2926d6acc9e2642b6f6da
URL: https://github.com/kamailio/kamailio/commit/10292cf151bd4d0ab9d2926d6acc9e2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-11-26T13:44:27+01:00
sworker: docs update to reflect use with event_route[core:pre-routing]
---
Modified: src/modules/sworker/doc/sworker_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/10292cf151bd4d0ab9d2926d6acc9e2…
Patch: https://github.com/kamailio/kamailio/commit/10292cf151bd4d0ab9d2926d6acc9e2…
---
diff --git a/src/modules/sworker/doc/sworker_admin.xml b/src/modules/sworker/doc/sworker_admin.xml
index e1675a45bf..9656ff1071 100644
--- a/src/modules/sworker/doc/sworker_admin.xml
+++ b/src/modules/sworker/doc/sworker_admin.xml
@@ -17,11 +17,20 @@
<title>Overview</title>
<para>
This module can delegate processing of SIP requests to a group of
- workers in the configuration file. The async workers have to defined
- with the global parameter.
+ workers in the configuration file by using event_route[core:pre-routing].
+ The async workers have to defined with the global parameter. The worker
+ process that received the message internally does the usual execution
+ of the config script, running request_route or reply_route.
</para>
<para>
- It does not create the transaction and nor suspend it.
+ Note: the behaviour is different than the async module, because it does
+ not create the transaction (obviously also not performing suspend).
+ </para>
+ <para>
+ Note: it does not propagate anything set in the event_route, therefore
+ any set flag, or avp, etc. are lost. The SIP message is processed by the
+ delegated worker as it was fresh received from the network (including
+ parsing).
</para>
</section>
@@ -88,14 +97,19 @@ request_route {
<function moreinfo="none">swork_task(gname)</function>
</title>
<para>
- Delegate the processing of SIP message to a group of async workers.
+ Delegate the processing of SIP message to a group of async workers. The
+ function is restricted to be used inside event_route[core:pre-routing].
</para>
<para>
The parameter gname provides the name of the group workers, it can
contain pseudo-variables.
</para>
<para>
- The function returns 0 (exit) in case the task is delegated.
+ The function returns 1 (true) in case the task is delegated. After that,
+ 'drop' must be used so processing of the message does not continue to
+ request_route or reply_route in the same process, it is going to be done
+ by the delegated group of workers. It returns -1 (false) in case there
+ was a proble delegating the processing.
</para>
<para>
This function can be used from REQUEST_ROUTE|CORE_REPLY_ROUTE.
@@ -104,11 +118,10 @@ request_route {
<title><function>sworker_task()</function> usage</title>
<programlisting format="linespecific">
...
-request_route {
- if(!sworker_active()) {
+event_route[core:pre-routing] {
+ if(sworker_task("default")) {
xinfo("===== delegate processing [$Tf] [$si:$sp]\n");
- sworker_task("default");
- exit;
+ drop;
}
xinfo("===== processing continues [$Tf] [$si:$sp]\n");
...
Module: kamailio
Branch: master
Commit: f86ced0419787a3c5196edb055f30b39684e37c5
URL: https://github.com/kamailio/kamailio/commit/f86ced0419787a3c5196edb055f30b3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-11-26T13:23:05+01:00
core: new event_route[core:pre-routing]
- executed before running config script for SIP messages, if received
from the network, it is not executed if the message was dispatched
internally
- can be used to delegate processing to special workers via sworker
module
- if drop is used, then processing stops for that message, otherwise it
goes forther to request_route or reply_route
---
Modified: src/core/cfg.lex
Modified: src/core/cfg.y
Modified: src/core/globals.h
Modified: src/core/ip_addr.h
Modified: src/core/receive.c
---
Diff: https://github.com/kamailio/kamailio/commit/f86ced0419787a3c5196edb055f30b3…
Patch: https://github.com/kamailio/kamailio/commit/f86ced0419787a3c5196edb055f30b3…
Module: kamailio
Branch: 5.3
Commit: 19ac8252b08521e79cd7c6608ac38bdf3bad767a
URL: https://github.com/kamailio/kamailio/commit/19ac8252b08521e79cd7c6608ac38bd…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2020-11-26T08:16:58+01:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/rtpengine/README
---
Diff: https://github.com/kamailio/kamailio/commit/19ac8252b08521e79cd7c6608ac38bd…
Patch: https://github.com/kamailio/kamailio/commit/19ac8252b08521e79cd7c6608ac38bd…
---
diff --git a/src/modules/rtpengine/README b/src/modules/rtpengine/README
index f991ddd094..edaab1a5bb 100644
--- a/src/modules/rtpengine/README
+++ b/src/modules/rtpengine/README
@@ -1796,17 +1796,21 @@ modparam("rtpengine", "control_cmd_tos", 144)
4.72. hash_algo (integer)
Hashing algorithm to be used in node selection algorithm. Now there are
- 2 possibilities: legacy alogrithm - 0(very basic hash over callid) or
- SHA1 - 1(apply sha1 over the callid and calculate hash).
+ 2 possibilities: legacy algorithm - 0(very basic hash over callid),
+ SHA1 - 1(apply sha1 over the callid and calculate hash) or CRC32 -
+ 2(calculate crc32 sum over the callid).
Default value is 0, legacy algorithm.
- The values not falling into the range “0-1” .
+ The values not falling into the range “0-2” are ignored.
Example 1.73. Set control_cmd_tos parameter
...
### use SHA1 instead of legacy algorithm
modparam("rtpengine", "hash_algo", 1)
+
+### use CRC32 instead of legacy algorithm
+modparam("rtpengine", "hash_algo", 2)
...
5. Functions
Module: kamailio
Branch: 5.4
Commit: 18edda18229ee6e75370a078a5deb8f980274e52
URL: https://github.com/kamailio/kamailio/commit/18edda18229ee6e75370a078a5deb8f…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2020-11-26T08:16:39+01:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/rtpengine/README
---
Diff: https://github.com/kamailio/kamailio/commit/18edda18229ee6e75370a078a5deb8f…
Patch: https://github.com/kamailio/kamailio/commit/18edda18229ee6e75370a078a5deb8f…
---
diff --git a/src/modules/rtpengine/README b/src/modules/rtpengine/README
index 00e3746ffe..0483ddd273 100644
--- a/src/modules/rtpengine/README
+++ b/src/modules/rtpengine/README
@@ -1804,17 +1804,21 @@ modparam("rtpengine", "control_cmd_tos", 144)
4.72. hash_algo (integer)
Hashing algorithm to be used in node selection algorithm. Now there are
- 2 possibilities: legacy algorithm - 0(very basic hash over callid) or
- SHA1 - 1(apply sha1 over the callid and calculate hash).
+ 2 possibilities: legacy algorithm - 0(very basic hash over callid),
+ SHA1 - 1(apply sha1 over the callid and calculate hash) or CRC32 -
+ 2(calculate crc32 sum over the callid).
Default value is 0, legacy algorithm.
- The values not falling into the range “0-1” are ignored.
+ The values not falling into the range “0-2” are ignored.
Example 1.73. Set control_cmd_tos parameter
...
### use SHA1 instead of legacy algorithm
modparam("rtpengine", "hash_algo", 1)
+
+### use CRC32 instead of legacy algorithm
+modparam("rtpengine", "hash_algo", 2)
...
5. Functions