Hello,
a quick note to the community forums to announce that the registration
for the next Kamailio World Conference (June 5-7, 2022, in Berlin,
Germany) is now open! The event returns to an in-person conference
format, at the same wonderful location in the city center of Berlin!
More details are available at:
* https://www.kamailioworld.com/k2023/registration/
Call for presentations is also open, there is already a group of very
interesting submissions, we aim to publish details about them in the
near future.
Looking forward to meeting many of you in Berlin!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - June 5-7, 2023 - www.kamailioworld.com
Kamailio Advanced Training - Online - March 27-30, 2023 - www.asipto.com
#### Pre-Submission Checklist
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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:
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
Hide error messages from "which" to avoid polluting kamctl's output (e.g. when a JSON document is returned) in environments where STDOUT and STDERR may be combined into a single stream (e.g. containers).
Without this change, kamctl's output may end up containing error messages, resulting in invalid/unparsable data. This is caused by the stdout & stderr streams being combined into a single stream in some environments, which may be outside the end-user's control (e.g. external cloud provider).
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3377
-- Commit Summary --
* kamctl: hide errors raised by "which"
-- File Changes --
M utils/kamctl/kamctl.base (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3377.patchhttps://github.com/kamailio/kamailio/pull/3377.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3377
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3377(a)github.com>
Module: kamailio
Branch: 5.5
Commit: a9deaa503ff20a3384fe74e37093464c21885e44
URL: https://github.com/kamailio/kamailio/commit/a9deaa503ff20a3384fe74e37093464…
Author: Richard Fuchs <rfuchs(a)sipwise.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2023-02-16T11:10:10Z
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)
(cherry picked from commit ea782be2cc29589f4dd55f0d91c11049b5280fe0)
---
Modified: src/modules/rtpengine/rtpengine.c
---
Diff: https://github.com/kamailio/kamailio/commit/a9deaa503ff20a3384fe74e37093464…
Patch: https://github.com/kamailio/kamailio/commit/a9deaa503ff20a3384fe74e37093464…
---
diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c
index 62665205787..9cd3bd4061c 100644
--- a/src/modules/rtpengine/rtpengine.c
+++ b/src/modules/rtpengine/rtpengine.c
@@ -3320,6 +3320,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
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>