Module: kamailio
Branch: 5.7
Commit: 7e1f330e2dc916138aa9a899da49c452b9f59740
URL: https://github.com/kamailio/kamailio/commit/7e1f330e2dc916138aa9a899da49c45…
Author: harish <toharishs(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-05-16T18:03:54+02:00
Topos: Added CallID Mask Document for Topos
Added document for Call-ID Mask in Topos Module
(cherry picked from commit 14d4b2422c0fed27fecf01665197f9d0669aa24e)
---
Modified: src/modules/topos/doc/topos_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/7e1f330e2dc916138aa9a899da49c45…
Patch: https://github.com/kamailio/kamailio/commit/7e1f330e2dc916138aa9a899da49c45…
---
diff --git a/src/modules/topos/doc/topos_admin.xml b/src/modules/topos/doc/topos_admin.xml
index dcf61a0fed6..82e7c1e45eb 100644
--- a/src/modules/topos/doc/topos_admin.xml
+++ b/src/modules/topos/doc/topos_admin.xml
@@ -57,6 +57,12 @@
for topology stripping and restoring.
</para>
</listitem>
+ <listitem>
+ <para>
+ <emphasis>topoh module</emphasis> - in case of Call-ID mask
+ for Call-ID masking.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</section>
@@ -130,14 +136,14 @@ modparam("topos", "db_url", "&exampledb;")
<section id="topos.p.mask_callid">
<title><varname>mask_callid</varname> (int)</title>
<para>
- Note: this functionality is not implemented yet - the
- parameter is present in order to be in pair with topoh
- module.
- </para>
- <para>
- Whether to replace or not the Call-ID with another
- unique id generated by &kamailio;.
+ Whether to encode the Call-id: header. Some SIP extensions include
+ the Call-id in the SIP message payload or header, so it is safe to
+ not encode Call-id in such cases. Well-known extensions such as
+ call transfer or conference join will be added to work with encoded
+ Call-id.
+ Topoh module should be loaded with use_mode paramerter set to 1
</para>
+
<para>
<emphasis>
Default value is 0 (do not mask).
### Description
I'm noticing an issue with certain RPC after upgrading to 5.6. I'm using "db_postgres".
If I run ul.flush like this:
```
kamcmd ul.flush
# no output
```
None of the in-memory registrations are flushed to the DB and in the log I see a bunch of lines like this:
```
May 12 20:39:16 <dummy-hostname> /usr/sbin/kamailio[9006]: ERROR: <core> [db.c:481]: db_use_table(): invalid connection parameter
May 12 20:39:16 <dummy-hostname> /usr/sbin/kamailio[9006]: ERROR: usrloc [ucontact.c:1142]: db_update_ucontact_ruid(): sql use_table failed
May 12 20:39:16 <dummy-hostname> /usr/sbin/kamailio[9006]: ERROR: usrloc [urecord.c:433]: wb_timer(): updating contact in db failed (aor: fake-1(a)aor.com)
May 12 20:39:16 <dummy-hostname> /usr/sbin/kamailio[9006]: ERROR: <core> [db.c:481]: db_use_table(): invalid connection parameter
May 12 20:39:16 <dummy-hostname> /usr/sbin/kamailio[9006]: ERROR: usrloc [ucontact.c:1142]: db_update_ucontact_ruid(): sql use_table failed
May 12 20:39:16 <dummy-hostname> /usr/sbin/kamailio[9006]: ERROR: usrloc [urecord.c:433]: wb_timer(): updating contact in db failed (aor: fake-2(a)aor.com)
```
I see the same thing with ul.db_users:
```
kamcmd ul.db_users location
# returns the following output
error: 500 - Failed to use table
# in the log
ERROR: <core> [db.c:481]: db_use_table(): invalid connection parameter
```
### Troubleshooting
#### Reproduction
Seems to happen consistently on 5.6, using psql as the db engine. I tested on 5.4 and it's not happening.
It's easier to test with ```kamcmd ul.db_users location``` because you need registrations that haven't been flushed to the DB for the error to manifest.
* **Operating System**:
```
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Kernel:
4.19.0-21-cloud-amd64
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3452
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3452(a)github.com>
Module: kamailio
Branch: master
Commit: 3823056e55db45831abc584a7df2b8998c18cf10
URL: https://github.com/kamailio/kamailio/commit/3823056e55db45831abc584a7df2b89…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2023-05-16T14:16:33+02:00
modules: readme files regenerated - usrloc ... [skip ci]
---
Modified: src/modules/usrloc/README
---
Diff: https://github.com/kamailio/kamailio/commit/3823056e55db45831abc584a7df2b89…
Patch: https://github.com/kamailio/kamailio/commit/3823056e55db45831abc584a7df2b89…
---
diff --git a/src/modules/usrloc/README b/src/modules/usrloc/README
index 2eedbf74dc..00b0743e9a 100644
--- a/src/modules/usrloc/README
+++ b/src/modules/usrloc/README
@@ -1305,7 +1305,9 @@ modparam("usrloc", "db_clean_tcp", 1)
4.5. ul.flush
- Triggers the flush of USRLOC memory cache into DB.
+ Triggers the flush of USRLOC memory cache into DB from the RPC process.
+ It succeeds only if the the db_mode is set to a value that enables
+ connectivity to database.
4.6. ul.add
Module: kamailio
Branch: master
Commit: f4deff8d064e9931fd4ee4fe1bbe166901e7c617
URL: https://github.com/kamailio/kamailio/commit/f4deff8d064e9931fd4ee4fe1bbe166…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-05-16T14:07:22+02:00
usrloc: docs updated for ul.flush to indicate it depends on db mode
---
Modified: src/modules/usrloc/doc/usrloc_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/f4deff8d064e9931fd4ee4fe1bbe166…
Patch: https://github.com/kamailio/kamailio/commit/f4deff8d064e9931fd4ee4fe1bbe166…
---
diff --git a/src/modules/usrloc/doc/usrloc_admin.xml b/src/modules/usrloc/doc/usrloc_admin.xml
index ca2295ac67a..61491648a0c 100644
--- a/src/modules/usrloc/doc/usrloc_admin.xml
+++ b/src/modules/usrloc/doc/usrloc_admin.xml
@@ -1633,7 +1633,9 @@ modparam("usrloc", "db_clean_tcp", 1)
<function moreinfo="none">ul.flush</function>
</title>
<para>
- Triggers the flush of USRLOC memory cache into DB.
+ Triggers the flush of USRLOC memory cache into DB from the RPC process. It
+ succeeds only if the the db_mode is set to a value that enables connectivity
+ to database.
</para>
</section>
<section id="usrloc.r.add">
Module: kamailio
Branch: master
Commit: f5f681c43a4736e4ec3ce5f16e11e61305384d79
URL: https://github.com/kamailio/kamailio/commit/f5f681c43a4736e4ec3ce5f16e11e61…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2023-05-16T13:31:19+02:00
modules: readme files regenerated - topos ... [skip ci]
---
Modified: src/modules/topos/README
---
Diff: https://github.com/kamailio/kamailio/commit/f5f681c43a4736e4ec3ce5f16e11e61…
Patch: https://github.com/kamailio/kamailio/commit/f5f681c43a4736e4ec3ce5f16e11e61…
---
diff --git a/src/modules/topos/README b/src/modules/topos/README
index 1f8e8c191d..be21cb2ef5 100644
--- a/src/modules/topos/README
+++ b/src/modules/topos/README
@@ -171,6 +171,7 @@ Chapter 1. Admin Guide
requests).
* database module - to store the data for topology stripping and
restoring.
+ * topoh module - in case of Call-ID mask for Call-ID masking.
2.2. External Libraries or Applications
@@ -228,11 +229,11 @@ modparam("topos", "db_url", "dbdriver://username:password@dbhost/dbname")
3.3. mask_callid (int)
- Note: this functionality is not implemented yet - the parameter is
- present in order to be in pair with topoh module.
-
- Whether to replace or not the Call-ID with another unique id generated
- by Kamailio.
+ Whether to encode the Call-id: header. Some SIP extensions include the
+ Call-id in the SIP message payload or header, so it is safe to not
+ encode Call-id in such cases. Well-known extensions such as call
+ transfer or conference join will be added to work with encoded Call-id.
+ Topoh module should be loaded with use_mode paramerter set to 1
Default value is 0 (do not mask).