Module: kamailio
Branch: 5.4
Commit: 609685c91d92337a1d0832d709ebff437fb193ef
URL: https://github.com/kamailio/kamailio/commit/609685c91d92337a1d0832d709ebff4…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2020-09-22T19:46:21+02:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/usrloc/README
---
Diff: https://github.com/kamailio/kamailio/commit/609685c91d92337a1d0832d709ebff4…
Patch: https://github.com/kamailio/kamailio/commit/609685c91d92337a1d0832d709ebff4…
---
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: 5.4
Commit: 79ec049ba50c0c48c02748c2679c07f4da2a766e
URL: https://github.com/kamailio/kamailio/commit/79ec049ba50c0c48c02748c2679c07f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-09-22T19:28:58+02:00
usrloc: docs for ka_timeout module parameter
(cherry picked from commit 2e9d4e2dc45bf5baab1bff9c13fc841b66793cb4)
---
Modified: src/modules/usrloc/doc/usrloc_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/79ec049ba50c0c48c02748c2679c07f…
Patch: https://github.com/kamailio/kamailio/commit/79ec049ba50c0c48c02748c2679c07f…
---
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>
### Description
If the SIP request URI has a parameter ;user=phone, then the match with `myself` fails with error in log.
### Troubleshooting
Sending an OPTIONS request through the proxy:
```
OPTIONS sip:+358removed@example.com;user=phone SIP/2.0.
...
From: <sip:+358removed@example.com;user=phone>;tag=JJhksk01ou7PFTq8xz1-GlhgGNG-c94A.
To: <sip:+358removed@example.com;user=phone>.
...
Content-Length: 0.
```
Note: The R-URI does NOT match myself. It never does in my case unless it's an attacker.
#### Reproduction
My config is very simple in terms of aliases:
```
auto_aliases=no
alias=172.29.1.21:5060
```
and in routing block:
` if (uri==myself) return;`
Log shows:
```
Listening on
udp: 172.29.1.21 [172.29.1.21]:5060
Aliases:
*: 172.29.1.21:5060
...
7(20681) ERROR: <core> [core/resolve.c:1808]: str2ip6buf(): invalid name, no conversion to IP address possible
...
```
### Possible Solutions
Sorry, I couldn't figure out where in the source this call to resolve.c functions happens.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.3.6 (x86_64/linux) bf6c08
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: bf6c08
compiled on 09:25:09 Sep 10 2020 with gcc 4.8.5
```
* **Operating System**:
```
Amazon Linux 2 (up to date) on AWS
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2482
<!-- 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, 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
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] 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
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2474
-- Commit Summary --
* WIP
-- File Changes --
M src/modules/keepalive/keepalive.h (1)
M src/modules/keepalive/keepalive_api.c (23)
M src/modules/keepalive/keepalive_core.c (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2474.patchhttps://github.com/kamailio/kamailio/pull/2474.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2474
Module: kamailio
Branch: master
Commit: fb115679228b19944f886893b47743db44465072
URL: https://github.com/kamailio/kamailio/commit/fb115679228b19944f886893b47743d…
Author: Nacho Garcia Segovia <nacho.gs(a)zaleos.net>
Committer: Nacho Garcia Segovia <nacho.gs(a)zaleos.net>
Date: 2020-09-14T13:18:37+02:00
keepalive: prevent race condition when deleting a destination
- Added a lock to ka_dest type, so we get it when we run callbacks that may be associated to an OPTIONS response
- Same lock is used to not remove destinations that are running callbacks
- Now find destinations consider owner and uri
---
Modified: src/modules/keepalive/keepalive.h
Modified: src/modules/keepalive/keepalive_api.c
Modified: src/modules/keepalive/keepalive_core.c
---
Diff: https://github.com/kamailio/kamailio/commit/fb115679228b19944f886893b47743d…
Patch: https://github.com/kamailio/kamailio/commit/fb115679228b19944f886893b47743d…