Module: kamailio
Branch: 5.6
Commit: ea782be2cc29589f4dd55f0d91c11049b5280fe0
URL: https://github.com/kamailio/kamailio/commit/ea782be2cc29589f4dd55f0d91c1104…
Author: Richard Fuchs <rfuchs(a)sipwise.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2023-02-16T11:09:42Z
rtpengine: avoid repeated queries to same node
If we know which node handles a particular call from the hash table,
only query that node once and then return error if it's dead, instead of
going into a pointless loop looking for other nodes to query which don't
exist.
closes #3370
(cherry picked from commit bd0ce126109f40f5217053f20e687b93b2268164)
---
Modified: src/modules/rtpengine/rtpengine.c
---
Diff: https://github.com/kamailio/kamailio/commit/ea782be2cc29589f4dd55f0d91c1104…
Patch: https://github.com/kamailio/kamailio/commit/ea782be2cc29589f4dd55f0d91c1104…
---
diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c
index ab6920c01d6..1b1f8b0ca92 100644
--- a/src/modules/rtpengine/rtpengine.c
+++ b/src/modules/rtpengine/rtpengine.c
@@ -3349,6 +3349,12 @@ select_rtpp_node(str callid, str viabranch, int do_test, struct rtpp_node **quer
// lookup node
node = select_rtpp_node_old(callid, viabranch, do_test, op);
+ if (node && is_queried_node(node, queried_nodes_ptr, queried_nodes)) {
+ LM_ERR("rtpengine node for callid=%.*s is known (%.*s) but it has already been queried, therefore not returning it\n",
+ callid.len, callid.s, node->rn_url.len, node->rn_url.s);
+ return NULL;
+ }
+
// check node
if (!node || (node_in_set(node, active_rtpp_set) == 0)) {
// run the selection algorithm
The file [th-test.c.txt](https://github.com/kamailio/kamailio/files/10608862/th-test.… contains the exact copy of the th_mask_encode() and th_mask_decode() functions from src/modules/topoh/th_mask.c . (except LM_ERR is removed and pkg_malloc/pkg_free are replaced with malloc/free).
When I run Kamilio under topoh and the websocket client calls, at some moment `sip:test-gnome-calls@bapha.be;gr=urn:uuid:f2f5a3cf-a0fb-0047-be50-740fb9bdc562;alias=87.118.146.153~60472~2>;+sip.instance="<urn:uuid:f2f5a3cf-a0fb-0047-be50-740fb9bdc562>";+org.linphone.specs="conference/1.0,ephemeral/1.1,groupchat/1.1,groupchat/1.2,lime"` is passed to th_mask_encode(). The output it `sip:127.3.4.84;line=sr-if7s1mg7i36PNf0AbdwPpfzlbqWEpLzsSGItpLwyN39ZMY4t1mCTSd6DNo4LWdIOpfpPp5FLpUQscX63Kd47W5EPWO6sNL90pLgoW5p-1fzlSdzO25n3KoIk1vHkWXptc5wOeopsWXi-eo9*`. This is put in a Contact: header. When that last string is passed to th_mask_decode(), e.g. because BYE or ACK have it as R-URI, the output is `sip:test-gnome-calls@bapha.be;gr=urn:uuid:f2f5a3cf-a0fb-0047-be50-740fb9bdc562;alias=87.118.1`. From the initial input the final output misses at least `46.153`.
The attached file contains under `b2` another input, which is passed ot th_mask_decode. This is the actual input Kamailio gets at runtime and passes to th_mask_decode. The result is not a string — callu.b.p...b.;.r...n:s..d..2lQ — where the dots represent unprintable bytes.
The error report is that th_mask_encode() produces output, which th_mask_decode() does not convert to its origin.
N.B.: The above problem happens, when a websocket client calls TCP-client with topoh-module. When a TLS-client calls TCP-client (no websockets involved), topoh does not make problems — BYE is delivered properly.
See also:
* https://lists.kamailio.org/mailman3/hyperkitty/list/sr-users@lists.kamailio…
* https://lists.kamailio.org/mailman3/hyperkitty/list/sr-users@lists.kamailio…
This might also be related:
* https://lists.kamailio.org/mailman3/hyperkitty/list/sr-users@lists.kamailio…
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3358
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3358(a)github.com>
## Description
When one rtpengine instance becomes unavailable on a Kamailio instance with moderate call traffic, even where there are multiple rtpengine instances configured for high availability, all processes can become blocked and Kamailio stops responding to all requests.
We produced this in a real world test, with two Kamailio servers running (20 child processes) and two rtpengine servers running. We loaded the Kamailio servers with calls, some answered, some ringing/busy/etc, and then made one rtpengine server drop all packets. Both Kamailio servers were able to briefly detect that the rtpengine instance was unavailable when it attempted to send an offer to it, but then as existing calls began to complete, both Kamailio servers became congested attempting to send "delete" commands to rtpengine. Both Kamailio servers then became unavailable and stopped responding to all messages for 10 minutes, until we restored rtpengine.
As such, an rtpengine server that crashes can cause a complete Kamailio outage.
## Troubleshooting
By using the reproduction steps below, we were easily able to make Kamailio stop responding to all incoming SIP messages when taking down an rtpengine instance.
The logs below show the sequence of events when this is reproduced for a single call.
Configuration:
- `rtpengine_tout_ms` was not configured and had the default value of 1000ms.
- `rtpengine_retr` was not configured and had the default value of 5.
- `queried_nodes_limit` was not configured and had the default value (of 30?).
- TM's `exec_time_check` was not configured and had the default value of 5000ms.
**A call is forwarded using t_relay and rtpengine_manage. rtpengine is killed mid-call. The call ends with 486.**
When the t_on_failure route is called, the config makes a singular call to rtpengine_manage, however what follows is 30 errors, all mentioning the same rtpengine instance:
```
ERROR: rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
```
Followed by the below:
```
ERROR: rtpengine [rtpengine.c:2729]: rtpp_function_call(): queried nodes limit reached
WARNING: tm [t_reply.c:1094]: run_failure_handlers(): failure route execution took too long: 150153261 us
```
Each timeout is 5 seconds (5x retries of 1000ms), which corresponds to about 150 seconds over 30 attempts. This matches the warning generated by tm.
In this case, there was about 5 minutes of time where a process was blocked. 150 seconds for the child leg's failure route, and 150 seconds for the parent leg's failure route. When this happens for many calls at once, congestion is guaranteed.
The 30 attempts to delete the call from rtpengine comes from the default value of `queried_nodes_limit`. This behavior doesn't make sense to me -- it's a retry loop that runs a retry loop.
## Reproduction
_tldr: kill rtpengine via iptables mid-call with the default rtpengine settings and you'll see lots of errors._
You can reproduce this with one or multiple rtpengine instances configured in Kamailio. It's easier with just one.
Standard setup, but importantly:
- forwarding a call using t_relay
- t_on_branch is configured which calls rtpengine_manage
- t_on_failure is configured which calls rtpengine_manage
To reproduce easily, we configured the destination server to send a 100, a 180, wait 20 seconds, then send a 486.
Place a number of calls to Kamailio (we used sipp) -- importantly, exceeding the number of child processes configured. You can reproduce the issue with just one call, but this wont make Kamailio unresponsive.
Once the calls are placed, and still in progress (ie before the 486 is returned), use iptables on the rtpengine server to drop all traffic on its control port.
When the call(s) start receiving the 486, you will notice a flood of error messages `timeout waiting reply for command "delete" from RTPEngine` for approximately 5 minutes per call. This blocks the process.
If it's now attempting to send the delete command to rtpengine for a number of calls greater than your child process count: attempt to send any other SIP messages to Kamailio and you will not receive a response.
## Log Messages
This is a log for a single call, forwarded using t_relay. All calls to rtpengine_manage are immediately surrounded by info log messages "calling rtpengine_manage" and "completed calling rtpengine_manage".
```
Feb 12 23:40:54 debian-kamailio kamailio[27715]: INFO: {1 1 INVITE 1-27864(a)127.0.1.1} <script>: new branch [0] to sip:0421XXXXXX@192.168.X.X:9060
Feb 12 23:40:54 debian-kamailio kamailio[27715]: INFO: {1 1 INVITE 1-27864(a)127.0.1.1} <script>: branch_route: calling rtpengine_manage
Feb 12 23:40:54 debian-kamailio kamailio[27715]: INFO: {1 1 INVITE 1-27864(a)127.0.1.1} <script>: branch_route: completed calling rtpengine_manage
Feb 12 23:40:54 debian-kamailio kamailio[27732]: INFO: {2 1 INVITE 1-27864(a)127.0.1.1} <script>: onreply_route: calling rtpengine_manage
Feb 12 23:40:54 debian-kamailio kamailio[27732]: INFO: {2 1 INVITE 1-27864(a)127.0.1.1} <script>: onreply_route: completed calling rtpengine_manage
Feb 12 23:40:55 debian-kamailio kamailio[27730]: INFO: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} <script>: new branch [0] to sip:61421764018@192.168.X.X:9092;transport=udp
Feb 12 23:40:55 debian-kamailio kamailio[27730]: INFO: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} <script>: branch_route: calling rtpengine_manage
Feb 12 23:40:55 debian-kamailio kamailio[27730]: INFO: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} <script>: branch_route: completed calling rtpengine_manage
Feb 12 23:40:55 debian-kamailio kamailio[27717]: INFO: {2 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} <script>: onreply_route: calling rtpengine_manage
Feb 12 23:40:55 debian-kamailio kamailio[27717]: INFO: {2 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} <script>: onreply_route: completed calling rtpengine_manage
Feb 12 23:40:55 debian-kamailio kamailio[27714]: INFO: {2 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} <script>: onreply_route: calling rtpengine_manage
Feb 12 23:40:55 debian-kamailio kamailio[27714]: INFO: {2 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} <script>: onreply_route: completed calling rtpengine_manage
Feb 12 23:40:55 debian-kamailio kamailio[27735]: INFO: {2 1 INVITE 1-27864(a)127.0.1.1} <script>: onreply_route: calling rtpengine_manage
Feb 12 23:40:55 debian-kamailio kamailio[27735]: INFO: {2 1 INVITE 1-27864(a)127.0.1.1} <script>: onreply_route: completed calling rtpengine_manage
Feb 12 23:41:15 debian-kamailio kamailio[27713]: INFO: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} <script>: failure_route: calling rtpengine_manage
Feb 12 23:41:20 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:41:25 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:41:30 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:41:35 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:41:40 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:41:45 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:41:50 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:41:55 debian-kamailio kamailio[27740]: INFO: {2 1 INVITE 1-27864(a)127.0.1.1} <script>: onreply_route: calling rtpengine_manage
Feb 12 23:41:55 debian-kamailio kamailio[27740]: INFO: {2 1 INVITE 1-27864(a)127.0.1.1} <script>: onreply_route: completed calling rtpengine_manage
Feb 12 23:41:55 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:42:00 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:42:05 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:42:10 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:42:16 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:42:21 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:42:26 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:42:31 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:42:36 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:42:41 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:42:46 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:42:51 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:42:55 debian-kamailio kamailio[27734]: INFO: {2 1 INVITE 1-27864(a)127.0.1.1} <script>: onreply_route: calling rtpengine_manage
Feb 12 23:42:55 debian-kamailio kamailio[27734]: INFO: {2 1 INVITE 1-27864(a)127.0.1.1} <script>: onreply_route: completed calling rtpengine_manage
Feb 12 23:42:56 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:43:01 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:43:06 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:43:11 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:43:16 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:43:21 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:43:26 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:43:31 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:43:36 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:43:41 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:43:46 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:43:46 debian-kamailio kamailio[27713]: ERROR: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} rtpengine [rtpengine.c:2729]: rtpp_function_call(): queried nodes limit reached
Feb 12 23:43:46 debian-kamailio kamailio[27713]: INFO: {1 63577835 INVITE 720bf6d9-25fb-123c-cb91-80fa5d718101} <script>: failure_route: completed calling rtpengine_manage
Feb 12 23:43:46 debian-kamailio kamailio[27713]: WARNING: tm [t_reply.c:1094]: run_failure_handlers(): failure route execution took too long: 150153207 us
Feb 12 23:43:46 debian-kamailio kamailio[27736]: INFO: {1 63577835 ACK 720bf6d9-25fb-123c-cb91-80fa5d718101} <script>: ACK: calling rtpengine_manage
Feb 12 23:43:46 debian-kamailio kamailio[27736]: INFO: {1 63577835 ACK 720bf6d9-25fb-123c-cb91-80fa5d718101} <script>: ACK: completed calling rtpengine_manage
Feb 12 23:43:46 debian-kamailio kamailio[27738]: INFO: {1 1 INVITE 1-27864(a)127.0.1.1} <script>: failure_route: calling rtpengine_manage
Feb 12 23:43:51 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:43:56 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:44:01 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:44:06 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:44:11 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:44:16 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:44:21 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:44:26 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:44:31 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:44:36 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:44:41 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:44:46 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:44:51 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:44:56 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:45:01 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:45:06 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:45:11 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:45:16 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:45:21 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:45:26 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:45:31 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:45:36 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:45:41 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:45:46 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:45:51 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:45:56 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:46:01 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:46:06 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:46:11 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:46:16 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:3129]: send_rtpp_command(): timeout waiting reply for command "delete" from RTPEngine <udp:192.168.X.X:2223>
Feb 12 23:46:16 debian-kamailio kamailio[27738]: ERROR: {1 1 INVITE 1-27864(a)127.0.1.1} rtpengine [rtpengine.c:2729]: rtpp_function_call(): queried nodes limit reached
Feb 12 23:46:16 debian-kamailio kamailio[27738]: INFO: {1 1 INVITE 1-27864(a)127.0.1.1} <script>: failure_route: completed calling rtpengine_manage
Feb 12 23:46:16 debian-kamailio kamailio[27738]: WARNING: tm [t_reply.c:1094]: run_failure_handlers(): failure route execution took too long: 150153261 us
```
### Possible Solutions
To minimize the issue, `rtpengine_tout_ms` and `rtpengine_retr` can be reduced. This doesn't exactly the fix the problem, as you need reasonable values here.
Additionally, `queried_nodes_limit` can be reduced to limit the number of unnecessary retries, at the expense of the functionality it gives you to initially select candidate nodes.
**Actual solution:** I think that, when a call has already selected an rtpengine instance successfully, and that's in the hash table, then `queried_nodes_limit` should not apply. It should only attempt to send commands with a total number of attempts = `rtpengine_retr`, not `rtpengine_retr * queried_nodes_limit`.
By changing the behavior as above, tweaking `rtpengine_tout_ms` and `rtpengine_retr`, and increasing the number of child workers, an rtpengine becoming unavailable should cause much less impactful blocking.
## Additional Information
**Kamailio version:** (attempted on 5.4.1 and latest master)
```
version: kamailio 5.4.1 (x86_64/linux)
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, TLS_PTHREAD_MUTEX_SHARED
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: unknown
compiled on 23:22:15 Aug 15 2022 with gcc 8.3.0
```
```
version: kamailio 5.7.0-dev3 (x86_64/linux) 2384c3
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, 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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
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: 2384c3
compiled on 23:22:22 Feb 12 2023 with gcc 8.3.0
```
**Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `lsb_release -a` and `uname -a`)
-->
```
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Linux debian-kamailio 4.19.0-20-amd64 #1 SMP Debian 4.19.235-1 (2022-03-17) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3370
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3370(a)github.com>
Module: kamailio
Branch: master
Commit: bd0ce126109f40f5217053f20e687b93b2268164
URL: https://github.com/kamailio/kamailio/commit/bd0ce126109f40f5217053f20e687b9…
Author: Richard Fuchs <rfuchs(a)sipwise.com>
Committer: Richard Fuchs <rfuchs(a)sipwise.com>
Date: 2023-02-15T08:49:01-05:00
rtpengine: avoid repeated queries to same node
If we know which node handles a particular call from the hash table,
only query that node once and then return error if it's dead, instead of
going into a pointless loop looking for other nodes to query which don't
exist.
closes #3370
---
Modified: src/modules/rtpengine/rtpengine.c
---
Diff: https://github.com/kamailio/kamailio/commit/bd0ce126109f40f5217053f20e687b9…
Patch: https://github.com/kamailio/kamailio/commit/bd0ce126109f40f5217053f20e687b9…
---
diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c
index 5444b0d461..46640a5d3d 100644
--- a/src/modules/rtpengine/rtpengine.c
+++ b/src/modules/rtpengine/rtpengine.c
@@ -3378,6 +3378,12 @@ select_rtpp_node(str callid, str viabranch, int do_test, struct rtpp_node **quer
// lookup node
node = select_rtpp_node_old(callid, viabranch, do_test, op);
+ if (node && is_queried_node(node, queried_nodes_ptr, queried_nodes)) {
+ LM_ERR("rtpengine node for callid=%.*s is known (%.*s) but it has already been queried, therefore not returning it\n",
+ callid.len, callid.s, node->rn_url.len, node->rn_url.s);
+ return NULL;
+ }
+
// check node
if (!node || (node_in_set(node, active_rtpp_set) == 0)) {
// run the selection algorithm
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3374
-- Commit Summary --
* sanity: typos
* sca: typos
* sctp: typos
* sdpops: typos
* secfilter: typo
* secsipid: typos
* secsipid_proc: typos
* sipcapture: typos
* sipjson: typos
* sipt: typos
* siptrace: typos
* sl: typos
* slack: typos
* sms: typos
* smsops: typos
* snmpstats: typo
* sqlops: typo
* sst: typos
* statsc: typos
* stirshaken: typos
* stun: typos
* sworker: typos
-- File Changes --
M src/modules/sanity/sanity.c (8)
M src/modules/sca/sca_call_info.c (2)
M src/modules/sca/sca_notify.c (2)
M src/modules/sctp/doc/sctp_admin.xml (18)
M src/modules/sctp/sctp_server.c (8)
M src/modules/sdpops/doc/sdpops_admin.xml (10)
M src/modules/sdpops/sdpops_mod.c (2)
M src/modules/secfilter/doc/secfilter_admin.xml (2)
M src/modules/secsipid/doc/secsipid_admin.xml (4)
M src/modules/secsipid_proc/libsecsipid.h (4)
M src/modules/sipcapture/doc/sipcapture_admin.xml (6)
M src/modules/sipcapture/hep.c (4)
M src/modules/sipcapture/sipcapture.c (6)
M src/modules/sipjson/doc/sipjson_admin.xml (2)
M src/modules/sipjson/sipjson_mod.c (2)
M src/modules/sipt/doc/sipt_admin.xml (6)
M src/modules/sipt/sipt.c (2)
M src/modules/sipt/ss7_parser.c (4)
M src/modules/siptrace/doc/siptrace_admin.xml (10)
M src/modules/siptrace/siptrace.c (4)
M src/modules/siptrace/siptrace_hep.c (2)
M src/modules/sl/sl.c (4)
M src/modules/sl/sl_funcs.c (2)
M src/modules/slack/doc/slack_admin.xml (2)
M src/modules/sms/doc/params.xml (8)
M src/modules/sms/doc/sms.xml (2)
M src/modules/sms/sms_funcs.c (6)
M src/modules/smsops/doc/smsops_admin.xml (2)
M src/modules/smsops/examples/kamailio.cfg (4)
M src/modules/smsops/smsops_impl.c (6)
M src/modules/snmpstats/mibs/KAMAILIO-TC (2)
M src/modules/sqlops/doc/sqlops_admin.xml (2)
M src/modules/sst/doc/sst_admin.xml (6)
M src/modules/sst/sst.c (2)
M src/modules/sst/sst_handlers.c (32)
M src/modules/statsc/statsc_mod.c (4)
M src/modules/stirshaken/doc/stirshaken_admin.xml (6)
M src/modules/stun/kam_stun.c (36)
M src/modules/sworker/doc/sworker_admin.xml (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3374.patchhttps://github.com/kamailio/kamailio/pull/3374.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3374
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3374(a)github.com>
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3373
-- Commit Summary --
* drouting: typos
* domainpolicy: typos
* domain: typo
* dmq: typos
* dlgs: typos
* dmq_usrloc: typo
* dispatcher: typos
* dialplan: typos
* dialog: typos
* debugger: typos
* db_text: typos
* db_postgres: typos
* db_redis: typo
* db_perlvdb: typos
* db_oracle: typos
* db_unixodbc: typos
* db_mysql: typos
* db_mongodb: typos
* db_flatstore: typos
* db_cluster: typos
* db_cassandra: typos
* db_berkeley: typos
* db2_ops: typo
* db2_ldap: typos
-- File Changes --
M src/modules/db2_ldap/ld_con.c (2)
M src/modules/db2_ldap/ld_fld.h (2)
M src/modules/db2_ldap/ldap.cfg (2)
M src/modules/db2_ops/db2_ops.c (2)
M src/modules/db_berkeley/bdb_cmd.c (4)
M src/modules/db_berkeley/bdb_con.c (2)
M src/modules/db_berkeley/bdb_fld.h (2)
M src/modules/db_berkeley/bdb_lib.c (4)
M src/modules/db_berkeley/db_berkeley.c (8)
M src/modules/db_berkeley/doc/db_berkeley_admin.xml (6)
M src/modules/db_berkeley/km_bdb_lib.c (4)
M src/modules/db_cassandra/dbcassa_base.cpp (10)
M src/modules/db_cassandra/doc/db_cassandra_admin.xml (2)
M src/modules/db_cassandra/kamailio_cassa.cfg (8)
M src/modules/db_cluster/dbcl_api.h (2)
M src/modules/db_cluster/dbcl_data.h (2)
M src/modules/db_flatstore/db_flatstore.c (2)
M src/modules/db_flatstore/flat_con.c (2)
M src/modules/db_flatstore/km_doc/db_flatstore_admin.xml (2)
M src/modules/db_flatstore/km_flat_pool.c (2)
M src/modules/db_flatstore/km_flat_pool.h (2)
M src/modules/db_mongodb/mongodb_connection.h (2)
M src/modules/db_mongodb/mongodb_dbase.c (4)
M src/modules/db_mongodb/mongodb_dbase.h (2)
M src/modules/db_mysql/km_dbase.c (4)
M src/modules/db_oracle/asynch.c (2)
M src/modules/db_oracle/dbase.c (10)
M src/modules/db_oracle/doc/db_oracle_admin.xml (2)
M src/modules/db_oracle/val.c (2)
M src/modules/db_oracle/val.h (2)
M src/modules/db_perlvdb/perlvdb_conv.c (2)
M src/modules/db_postgres/km_dbase.c (10)
M src/modules/db_postgres/pg_con.c (4)
M src/modules/db_postgres/pg_fld.h (4)
M src/modules/db_postgres/pg_oid.h (2)
M src/modules/db_redis/redis_dbase.h (2)
M src/modules/db_text/dbt_api.c (2)
M src/modules/db_text/dbt_base.c (4)
M src/modules/db_text/dbt_res.c (2)
M src/modules/db_text/doc/db_text_admin.xml (2)
M src/modules/db_unixodbc/dbase.c (4)
M src/modules/debugger/debugger_api.c (6)
M src/modules/debugger/doc/debugger_admin.xml (4)
M src/modules/dialog/dialog.c (4)
M src/modules/dialog/dlg_cb.c (6)
M src/modules/dialog/dlg_cseq.c (10)
M src/modules/dialog/dlg_handlers.c (2)
M src/modules/dialog/dlg_req_within.c (2)
M src/modules/dialog/dlg_var.c (2)
M src/modules/dialog/doc/dialog_admin.xml (14)
M src/modules/dialog/doc/dialog_devel.xml (4)
M src/modules/dialplan/doc/dialplan_admin.xml (6)
M src/modules/dispatcher/dispatch.c (4)
M src/modules/dispatcher/dispatch.h (4)
M src/modules/dispatcher/doc/dispatcher.cfg (4)
M src/modules/dispatcher/doc/dispatcher_admin.xml (6)
M src/modules/dlgs/doc/dlgs_admin.xml (2)
M src/modules/dmq/dmq_funcs.c (2)
M src/modules/dmq/dmqnode.h (2)
M src/modules/dmq/doc/dmq_admin.xml (4)
M src/modules/dmq/notification_peer.h (2)
M src/modules/dmq_usrloc/doc/dmq_usrloc_admin.xml (2)
M src/modules/domain/doc/domain_admin.xml (2)
M src/modules/domainpolicy/doc/domainpolicy_admin.xml (12)
M src/modules/domainpolicy/domainpolicy.c (4)
M src/modules/domainpolicy/domainpolicy.h (2)
M src/modules/drouting/dr_load.c (2)
M src/modules/drouting/drouting.c (2)
M src/modules/drouting/routing.c (4)
M src/modules/drouting/routing.h (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3373.patchhttps://github.com/kamailio/kamailio/pull/3373.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3373
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3373(a)github.com>
Thanks, fixed,
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/c167c4738fce31cec292edc803160d6…
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/commit/c167c4738fce31cec292edc803160d607a3faaf6/100477082(a)github.com>
This line likely means
> kamctl rpc presence.presentity_show full * sipserver.com
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/c167c4738fce31cec292edc803160d6…
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/commit/c167c4738fce31cec292edc803160d607a3faaf6/100474300(a)github.com>
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3371
-- Commit Summary --
* p_usrloc: typos
* pdb: typos
* peering: typo
* permissions: typos
* pike: typos
* pipelimit: typo
* presence: typos
* presence_conference: typos
* presence_dialoginfo: typos
* presence_mwi: typo
* presence_profile: typo
* presence_reginfo: typos
* presence_xml: typos
* print_lib: typo
* pua: typos
* pua_dialoginfo: typos
* pua_reginfo: typos
* pua_xmpp: typos
* pv: typos
* pv_headers: typos
-- File Changes --
M src/modules/p_usrloc/p_usrloc_mod.c (4)
M src/modules/p_usrloc/udomain.c (2)
M src/modules/p_usrloc/ul_db_handle.c (2)
M src/modules/p_usrloc/urecord.c (2)
M src/modules/p_usrloc/urecord.h (2)
M src/modules/pdb/doc/pdb_admin.xml (2)
M src/modules/pdb/pdb.c (2)
M src/modules/peering/doc/peering_admin.xml (2)
M src/modules/permissions/doc/permissions_admin.xml (12)
M src/modules/permissions/rule.c (2)
M src/modules/pike/pike_funcs.c (4)
M src/modules/pipelimit/doc/pipelimit_admin.xml (2)
M src/modules/presence/doc/presence_admin.xml (14)
M src/modules/presence/doc/presence_devel.xml (2)
M src/modules/presence/event_list.h (2)
M src/modules/presence/notify.c (2)
M src/modules/presence/presence.c (2)
M src/modules/presence/presentity.c (2)
M src/modules/presence_conference/notify_body.c (6)
M src/modules/presence_conference/presence_conference.c (2)
M src/modules/presence_dialoginfo/notify_body.c (12)
M src/modules/presence_dialoginfo/presence_dialoginfo.c (2)
M src/modules/presence_mwi/presence_mwi.c (2)
M src/modules/presence_profile/presence_profile.c (2)
M src/modules/presence_reginfo/notify_body.c (8)
M src/modules/presence_reginfo/presence_reginfo.c (2)
M src/modules/presence_xml/doc/presence_xml_admin.xml (2)
M src/modules/presence_xml/notify_body.c (32)
M src/modules/presence_xml/presence_xml.c (2)
M src/modules/print_lib/print_lib.c (2)
M src/modules/pua/pua.c (4)
M src/modules/pua/pua_db.c (2)
M src/modules/pua/send_publish.c (2)
M src/modules/pua/send_publish.h (2)
M src/modules/pua/send_subscribe.h (2)
M src/modules/pua_dialoginfo/dialog_publish.c (2)
M src/modules/pua_dialoginfo/pua_dialoginfo.c (2)
M src/modules/pua_dialoginfo/pua_dialoginfo.h (2)
M src/modules/pua_reginfo/doc/pua_reginfo_admin.xml (4)
M src/modules/pua_xmpp/simple2xmpp.c (2)
M src/modules/pua_xmpp/xmpp2simple.c (2)
M src/modules/pv/pv.c (8)
M src/modules/pv/pv_branch.c (2)
M src/modules/pv/pv_core.c (8)
M src/modules/pv/pv_shv.c (2)
M src/modules/pv/pv_trans.c (2)
M src/modules/pv_headers/doc/functions.xml (2)
M src/modules/pv_headers/doc/params.xml (2)
M src/modules/pv_headers/pv_headers.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3371.patchhttps://github.com/kamailio/kamailio/pull/3371.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3371
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3371(a)github.com>
Module: kamailio
Branch: master
Commit: d87120dfb77d018cdf571cbcf18cf1950ce61987
URL: https://github.com/kamailio/kamailio/commit/d87120dfb77d018cdf571cbcf18cf19…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2023-02-13T13:16:18+01:00
modules: readme files regenerated - nathelper ... [skip ci]
---
Modified: src/modules/nathelper/README
---
Diff: https://github.com/kamailio/kamailio/commit/d87120dfb77d018cdf571cbcf18cf19…
Patch: https://github.com/kamailio/kamailio/commit/d87120dfb77d018cdf571cbcf18cf19…
---
diff --git a/src/modules/nathelper/README b/src/modules/nathelper/README
index 941cee9465..b1edb5d450 100644
--- a/src/modules/nathelper/README
+++ b/src/modules/nathelper/README
@@ -191,10 +191,10 @@ Chapter 1. Admin Guide
save() and should be used for ���REGISTER��� requests.
Note: fix_nated_contact() changes the ���Contact��� header, thus it breaks
- the RFC. Although usually this is not an issue, it may cause problems
+ the RFC. Although this is not always an issue, it may cause problems
with strict SIP clients. An alternative is to use add_contact_alias()
- that together with the handle_ruri_alias() is standards conforming and
- also supports reuse of TCP/TLS connections.
+ (or set_contact_alias()) that together with the handle_ruri_alias() is
+ standards conforming and also supports reuse of TCP/TLS connections.
2. NAT pinging types
@@ -285,12 +285,15 @@ modparam("nathelper", "natping_interval", 10)
4.3. ping_nated_only (integer)
If this parameter is set to 1 then only contacts that have the behind
- NAT ���nat_bflag��� flag in user location database set will get
- SIP-request-based ping.
-
- If it is 0 and sipping_bflag is not set, then the 4-bytes UDP ping is
- sent to all contacts. If it is 0 and sipping_bflag parameter is set,
- then SIP-request-based pinging is sent to all contacts.
+ NAT ���nat_bflag��� flag set in user location records get the NAT ping (the
+ ���nat_bflag��� is specified via modparam of usrloc module). By default the
+ ping is done with 4-bytes UDP packet. If sipping_bflag is also set,
+ then the ping is done with a stateless SIP request (by default: OPTIONS
+ request).
+
+ If it is 0, then all contacts get a NAT ping, by default being the
+ 4-bytes UDP packet. If it is 0 and sipping_bflag parameter is set, then
+ SIP-request-based pinging is sent to all contacts.
Default value is 0.
My experiments show that with
```
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)
modparam("usrloc", "nat_bflag", FLB_NATB)
```
when both FLB_NATB and FLB_NATSIPPING branch flags are set, no OPTIONS from Kamailio to UAC is generated, so I assume that nathelper.ping_nated_only=1 does force 4-bytes UDP keepalive.
This change spells the above, as the behaviour currently is not specified.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3346
-- Commit Summary --
* nathelper: ping_nated_only sends 4-bytes UDP-packet pings
-- File Changes --
M src/modules/nathelper/doc/nathelper_admin.xml (12)
M src/modules/nathelper/examples/4to6.cfg (2)
M src/modules/nathelper/examples/alg.cfg (2)
M src/modules/nathelper/nathelper.c (6)
M src/modules/nathelper/nhelpr_funcs.c (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3346.patchhttps://github.com/kamailio/kamailio/pull/3346.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3346
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3346(a)github.com>
Module: kamailio
Branch: master
Commit: fdf72bec2d6cc20618bc30d0978d7f24f8106d44
URL: https://github.com/kamailio/kamailio/commit/fdf72bec2d6cc20618bc30d0978d7f2…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2023-02-13T13:01:34+01:00
modules: readme files regenerated - nathelper ... [skip ci]
---
Modified: src/modules/nathelper/README
---
Diff: https://github.com/kamailio/kamailio/commit/fdf72bec2d6cc20618bc30d0978d7f2…
Patch: https://github.com/kamailio/kamailio/commit/fdf72bec2d6cc20618bc30d0978d7f2…
---
diff --git a/src/modules/nathelper/README b/src/modules/nathelper/README
index e091d2018f..941cee9465 100644
--- a/src/modules/nathelper/README
+++ b/src/modules/nathelper/README
@@ -107,7 +107,7 @@ Ovidiu Sas
1.17. Set alias_name parameter
1.18. fix_nated_contact usage
1.19. fix_nated_sdp usage
- 1.20. add_rcv_paramer usage
+ 1.20. add_rcv_param usage
1.21. fix_nated_register usage
1.22. nat_uac_test usage
1.23. is_rfc1918 usage
@@ -187,10 +187,10 @@ Chapter 1. Admin Guide
with request's source address:port pair. The function fix_nated_sdp()
adds the active direction indication to SDP (flag 0x01) and updates the
source IP address too (flag 0x02). The function fix_nated_register()
- exports exports the request's source address:port into an AVP to be
- used during save() and should be used for ���REGISTER��� requests.
+ exports the request's source address:port into an AVP to be used during
+ save() and should be used for ���REGISTER��� requests.
- Note: fix_nated_contact changes the ���Contact��� header, thus it breaks
+ Note: fix_nated_contact() changes the ���Contact��� header, thus it breaks
the RFC. Although usually this is not an issue, it may cause problems
with strict SIP clients. An alternative is to use add_contact_alias()
that together with the handle_ruri_alias() is standards conforming and
@@ -205,7 +205,7 @@ Chapter 1. Admin Guide
Kamailio;
+ Disadvantages: unidirectional traffic through NAT (inbound -
from outside to inside); As many NATs do update the bind
- timeout only on outbound traffic, the bind may expire and
+ timeout only on outbound traffic, the bind may expire and get
closed.
* SIP request - a stateless SIP request is sent to the UDP contact
address.
@@ -285,7 +285,8 @@ modparam("nathelper", "natping_interval", 10)
4.3. ping_nated_only (integer)
If this parameter is set to 1 then only contacts that have the behind
- NAT ���nat_bflag��� flag in user location database set will get ping.
+ NAT ���nat_bflag��� flag in user location database set will get
+ SIP-request-based ping.
If it is 0 and sipping_bflag is not set, then the 4-bytes UDP ping is
sent to all contacts. If it is 0 and sipping_bflag parameter is set,
@@ -583,7 +584,7 @@ if (search("User-Agent: Cisco ATA.*") {fix_nated_sdp("3");};
This function can be used from REQUEST_ROUTE.
- Example 1.20. add_rcv_paramer usage
+ Example 1.20. add_rcv_param usage
...
add_rcv_param(); # add the parameter to the Contact header
....
@@ -821,7 +822,7 @@ $ kamcmd nathelper.enable_ping 1
8.1. @nathelper.rewrite_contact[n]
Get n-th Contact value with IP:Port rewritten to source ip:port. N is
- counted from 1. Only IP:port is rewritten, remaining part are left
+ counted from 1. Only IP:port is rewritten, remaining parts are left
unchanged. Full nameaddr is supported.
Example 1.31. @nathelper.rewrite_contact usage
#### 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 -->
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to issue #3365
#### Description
previously $ulc(x=>aor) had only the user part even with use_domain set
output after applied the fix
```
│Feb 9 16:47:58.089067 spce proxy[30268]: DEBUG: usrloc [udomain.c:1053]: udomain_contact_expired_cb(): calling contact expired records - cycle [1]
│Feb 9 16:47:58.089100 spce proxy[30268]: DEBUG: usrloc [ul_callback.h:83]: run_ul_callbacks(): contact=0x7f8859ed4f50, callback type 8/8, id 0 entered
│Feb 9 16:47:58.089197 spce proxy[30268]: DEBUG: registrar [regpv.c:734]: reg_ul_expired_contact(): saved contact for <43991002(a)ce-trunk.lab> in [exp]
│Feb 9 16:47:58.089220 spce proxy[30268]: NOTICE: usrloc:contact-expired <script>: Contact ruid uloc-63e5131a-7639-1 to sip:43991002@192.168.2.177:5160 for user 43991002(a)ce-trunk.lab expired
```
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3366
-- Commit Summary --
* usrloc: correct AOR value on usrloc:contact-expired
-- File Changes --
M src/modules/usrloc/udomain.c (39)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3366.patchhttps://github.com/kamailio/kamailio/pull/3366.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3366
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3366(a)github.com>
<!-- 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
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] 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
#### Description
<!-- Describe your changes in detail -->
Allow replicating location's socket via its name.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3364
-- Commit Summary --
* dmq_usrloc: Add option to replicate socket via its name
-- File Changes --
M src/modules/dmq_usrloc/doc/dmq_usrloc_admin.xml (9)
M src/modules/dmq_usrloc/usrloc_sync.c (24)
M src/modules/dmq_usrloc/usrloc_sync.h (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3364.patchhttps://github.com/kamailio/kamailio/pull/3364.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3364
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3364(a)github.com>
Module: kamailio
Branch: master
Commit: c28b3a0ae61c9fd1fc8e8b2972686a0f8424c44a
URL: https://github.com/kamailio/kamailio/commit/c28b3a0ae61c9fd1fc8e8b2972686a0…
Author: �������������������� �������������������������������� <git-dpa(a)aegee.org>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-02-13T12:14:59+01:00
ipops: typos
---
Modified: src/modules/ipops/ipops_mod.c
Modified: src/modules/ipops/ipops_pv.c
---
Diff: https://github.com/kamailio/kamailio/commit/c28b3a0ae61c9fd1fc8e8b2972686a0…
Patch: https://github.com/kamailio/kamailio/commit/c28b3a0ae61c9fd1fc8e8b2972686a0…
---
diff --git a/src/modules/ipops/ipops_mod.c b/src/modules/ipops/ipops_mod.c
index d9f01317e5..a9f3962f61 100644
--- a/src/modules/ipops/ipops_mod.c
+++ b/src/modules/ipops/ipops_mod.c
@@ -695,7 +695,7 @@ static int ki_is_ip6_reference(sip_msg_t *msg, str *sval)
}
/*! \brief Return the IP type of the given argument (string or pv):
- * 1 = IPv4, 2 = IPv6, 3 = IPv6 refenrece, -1 = invalid IP. */
+ * 1 = IPv4, 2 = IPv6, 3 = IPv6 reference, -1 = invalid IP. */
static int w_ip_type(sip_msg_t* _msg, char* _s, char *_p2)
{
str string;
@@ -728,7 +728,7 @@ static int w_ip_type(sip_msg_t* _msg, char* _s, char *_p2)
}
/*! \brief Return the IP type of the given argument (string or pv):
- * 1 = IPv4, 2 = IPv6, 3 = IPv6 refenrece, -1 = invalid IP. */
+ * 1 = IPv4, 2 = IPv6, 3 = IPv6 reference, -1 = invalid IP. */
static int ki_ip_type(sip_msg_t *msg, str *sval)
{
switch (ip_parser_execute(sval->s, sval->len)) {
@@ -990,7 +990,7 @@ static int w_compare_pure_ips(sip_msg_t* _msg, char* _s1, char* _s2)
}
/*! \brief Return true if the first IP (string or pv) is within the subnet
- * defined by the second commma-separated IP list in CIDR notation.
+ * defined by the second comma-separated IP list in CIDR notation.
* IPv6 references not allowed. */
static int ki_ip_is_in_subnet(sip_msg_t* _msg, str* _sval1, str* _sval2)
{
@@ -1042,7 +1042,7 @@ static int ki_ip_is_in_subnet(sip_msg_t* _msg, str* _sval1, str* _sval2)
/*! \brief Return true if the first IP (string or pv) is within the subnet
- * defined by the second commma-separated IP list in CIDR notation.
+ * defined by the second comma-separated IP list in CIDR notation.
* IPv6 references not allowed. */
static int w_ip_is_in_subnet(sip_msg_t* _msg, char* _s1, char* _s2)
{
diff --git a/src/modules/ipops/ipops_pv.c b/src/modules/ipops/ipops_pv.c
index 9ee6f5879a..4eabbcac86 100644
--- a/src/modules/ipops/ipops_pv.c
+++ b/src/modules/ipops/ipops_pv.c
@@ -109,7 +109,7 @@ sr_dns_item_t *sr_dns_add_item(str *name)
n++;
}
if(n > 20) {
- LM_WARN("too many dns containers - adding nunmber %d - can fill memory\n",
+ LM_WARN("too many dns containers - adding number %d - can fill memory\n",
n);
}