Module: kamailio
Branch: master
Commit: e771c554d8ca8ec691c8f02efdf6f85187f49b0f
URL: https://github.com/kamailio/kamailio/commit/e771c554d8ca8ec691c8f02efdf6f85…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-09-14T13:34:38+02:00
rr: docs for loose_route_mode() function
---
Modified: src/modules/rr/doc/rr_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/e771c554d8ca8ec691c8f02efdf6f85…
Patch: https://github.com/kamailio/kamailio/commit/e771c554d8ca8ec691c8f02efdf6f85…
---
diff --git a/src/modules/rr/doc/rr_admin.xml b/src/modules/rr/doc/rr_admin.xml
index fb7b4d03ca..514c8b4a04 100644
--- a/src/modules/rr/doc/rr_admin.xml
+++ b/src/modules/rr/doc/rr_admin.xml
@@ -442,6 +442,34 @@ if(!loose_route_preloaded()) {
</example>
</section>
+ <section id="rr.f.loose_route_mode">
+ <title><function moreinfo="none">loose_route_mode(vmode)</function></title>
+
+ <para>The function is similar to `loose_route()`, but it does only
+ loose routing processing if vmode==1, skipping the testing of r-uri==myself
+ for performing strict routing. If vmode==0, it behaves like loose_route().
+ </para>
+ <para>It is a convenient function to use with application servers that
+ set the Contact URI to SIP server address.
+ </para>
+ <para>This function can be used from REQUEST_ROUTE.</para>
+
+ <example>
+ <title><function>loose_route_mode</function> usage</title>
+
+ <programlisting format="linespecific">
+...
+if(has_totag() and uri==myself) {
+ if(loose_route_mode("1")) {
+ rewritehostport("my.app.server:5090");
+ t_relay();
+ exit;
+ }
+}
+...
+</programlisting>
+ </example>
+ </section>
<section id="rr.f.record_route">
<title><function moreinfo="none">record_route([sparams])</function></title>
I am setting up a redundant active/active environment and I am in need of
having 2 kamailios operate as full proxies (meaning both of them will
accept registrations).
I am using DMQ in order to keep htables synched as well as dialogs.
For locations, I have a PostgreSQL database with the registrations.
My problem is that since both kamailios are accepting registrations the
UACs are only able to receive packets from the UAS on which they are
registered. Therefore when let's say UAC-1 registers to Kamailio A and it
tries to call UAC-2 which is registered on Kamailio B nothing happens
because UAC-2 receives the INVITE from Kamailio A and just ignores them.
I've spent almost a month trying to play with inter-kamailio communication
(that is, detecting these types of scenarios and sending the INVITE to
Kamailio B and have Kamailio B send the INVITE to UAC-2) but there are a
LOT of things that are not working properly let alone having to keep track
of all the dialog information and to/from tags and doing proper route of
all ACK/BYE/CANCEL, etc.
My question is, is there a way to achieve this scenario where multiple
kamailios can coexist with all responsibilities?
Things I've tried:
- Keep track of to/from tag in an htable and forward requests based on
who sent the request
- Use append_branches to handle multiple AOR (with the possibility of 1
user having multiple registrations in different kamailios)
- Manually tweaking $ru/$du based on what type of request is and who is
it destined to.
Any orientation will be appreciated as this is a crucial piece of the
project I'm working on.
Saludos,
[image: Facebook] <https://www.facebook.com/bvisonl>[image: Twitter]
<https://twitter.com/benjaminvison>[image: Instagram]
<https://instagram.com/bvisonl/>
Benjamín Visón / IT Engineer / Software Developer
bvisonl(a)gmail.com / (829)-664-5163
Module: kamailio
Branch: master
Commit: e52c1f334fb98e00809226cde190da3406976348
URL: https://github.com/kamailio/kamailio/commit/e52c1f334fb98e00809226cde190da3…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2020-09-11T22:16:12+02:00
modules: readme files regenerated - usrloc ... [skip ci]
---
Modified: src/modules/usrloc/README
---
Diff: https://github.com/kamailio/kamailio/commit/e52c1f334fb98e00809226cde190da3…
Patch: https://github.com/kamailio/kamailio/commit/e52c1f334fb98e00809226cde190da3…
---
diff --git a/src/modules/usrloc/README b/src/modules/usrloc/README
index ac3a6b7bb6..d075042834 100644
--- a/src/modules/usrloc/README
+++ b/src/modules/usrloc/README
@@ -94,8 +94,9 @@ Carsten Bock
3.52. ka_from (str)
3.53. ka_domain (str)
3.54. ka_filter (int)
- 3.55. ka_loglevel (int)
- 3.56. ka_logmsg (str)
+ 3.55. ka_timeout (int)
+ 3.56. ka_loglevel (int)
+ 3.57. ka_logmsg (str)
4. RPC Commands
@@ -197,8 +198,9 @@ Carsten Bock
1.52. ka_from parameter usage
1.53. ka_domain parameter usage
1.54. ka_filter parameter usage
- 1.55. ka_loglevel parameter usage
- 1.56. ka_logmsg parameter usage
+ 1.55. Set ka_timeout parameter
+ 1.56. ka_loglevel parameter usage
+ 1.57. ka_logmsg parameter usage
Chapter 1. Admin Guide
@@ -269,8 +271,9 @@ Chapter 1. Admin Guide
3.52. ka_from (str)
3.53. ka_domain (str)
3.54. ka_filter (int)
- 3.55. ka_loglevel (int)
- 3.56. ka_logmsg (str)
+ 3.55. ka_timeout (int)
+ 3.56. ka_loglevel (int)
+ 3.57. ka_logmsg (str)
4. RPC Commands
@@ -404,8 +407,9 @@ Chapter 1. Admin Guide
3.52. ka_from (str)
3.53. ka_domain (str)
3.54. ka_filter (int)
- 3.55. ka_loglevel (int)
- 3.56. ka_logmsg (str)
+ 3.55. ka_timeout (int)
+ 3.56. ka_loglevel (int)
+ 3.57. ka_logmsg (str)
3.1. nat_bflag (int)
@@ -683,8 +687,8 @@ modparam("usrloc", "desc_time_order", 1)
3.25. timer_interval (int)
Number of seconds between two timer runs. The module uses a timer to
- delete expired contacts, synchronize with database and other tasks,
- that need to be run periodically.
+ delete expired contacts, synchronize with database, send keepalives and
+ other tasks, that need to be run periodically.
Default value is 60.
@@ -1163,19 +1167,38 @@ modparam("usrloc", "ka_domain", "mydomain.com")
modparam("usrloc", "ka_filter", 1)
...
-3.55. ka_loglevel (int)
+3.55. ka_timeout (int)
+
+ The parameter sets the interval in seconds after which a contact is
+ removed from location table if it does not reply to SIP keepalives
+ (usually OPTIONS ping requests).
+
+ The features is available only for contacts that are stored in memory
+ (not working for db only mode of the usrloc module).
+
+ Keepalives are sent stateless, not using TM module. The value of this
+ parameter has to be few times higher than timer interval.
+
+ Default value is “0” (feature disabled).
+
+ Example 1.55. Set ka_timeout parameter
+...
+modparam("usrloc", "ka_timeout", 120)
+...
+
+3.56. ka_loglevel (int)
The level to print the log message when the keepalive response is
received. It should be a value between -5 (L_ALERT) and 3 (L_DBG).
Default value is “255” (disabled).
- Example 1.55. ka_loglevel parameter usage
+ Example 1.56. ka_loglevel parameter usage
...
modparam("usrloc", "ka_loglevel", 1)
...
-3.56. ka_logmsg (str)
+3.57. ka_logmsg (str)
The formatted log specification to be added to the message printed when
the keepalive is received and roundtrip time is computed. The log
@@ -1187,7 +1210,7 @@ modparam("usrloc", "ka_loglevel", 1)
Default value is “ to-uri: [$tu] remote-addr: [$sas]”.
- Example 1.56. ka_logmsg parameter usage
+ Example 1.57. ka_logmsg parameter usage
...
modparam("usrloc", "ka_logmsg", " to-uri: [$tu] remote-addr: [$sas]")
...
Module: kamailio
Branch: master
Commit: 2e9d4e2dc45bf5baab1bff9c13fc841b66793cb4
URL: https://github.com/kamailio/kamailio/commit/2e9d4e2dc45bf5baab1bff9c13fc841…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-09-11T22:07:31+02:00
usrloc: docs for ka_timeout module parameter
---
Modified: src/modules/usrloc/doc/usrloc_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/2e9d4e2dc45bf5baab1bff9c13fc841…
Patch: https://github.com/kamailio/kamailio/commit/2e9d4e2dc45bf5baab1bff9c13fc841…
---
diff --git a/src/modules/usrloc/doc/usrloc_admin.xml b/src/modules/usrloc/doc/usrloc_admin.xml
index 396d89828d..4b624fb81f 100644
--- a/src/modules/usrloc/doc/usrloc_admin.xml
+++ b/src/modules/usrloc/doc/usrloc_admin.xml
@@ -604,8 +604,8 @@ modparam("usrloc", "desc_time_order", 1)
<title><varname>timer_interval</varname> (int)</title>
<para>
Number of seconds between two timer runs. The module uses a timer to
- delete expired contacts, synchronize with database and other tasks,
- that need to be run periodically.
+ delete expired contacts, synchronize with database, send keepalives
+ and other tasks, that need to be run periodically.
</para>
<para>
<emphasis>
@@ -1424,6 +1424,36 @@ modparam("usrloc", "ka_filter", 1)
</example>
</section>
+ <section id="usrloc.p.ka_timeout">
+ <title><varname>ka_timeout</varname> (int)</title>
+ <para>
+ The parameter sets the interval in seconds after which a
+ contact is removed from location table if it does not reply to SIP
+ keepalives (usually OPTIONS ping requests).
+ </para>
+ <para>
+ The features is available only for contacts that are stored in memory
+ (not working for db only mode of the usrloc module).
+ </para>
+ <para>
+ Keepalives are sent stateless, not using TM module. The value of this
+ parameter has to be few times higher than timer interval.
+ </para>
+ <para>
+ <emphasis>
+ Default value is <quote>0</quote> (feature disabled).
+ </emphasis>
+ </para>
+ <example>
+ <title>Set <varname>ka_timeout</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("usrloc", "ka_timeout", 120)
+...
+</programlisting>
+ </example>
+ </section>
+
<section id="usrloc.p.ka_loglevel">
<title><varname>ka_loglevel</varname> (int)</title>
<para>