<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
Note that an issue report may be closed automatically after about 2 months
if there is no interest from developers or community users on pursuing it, being
considered expired. In such case, it can be reopened by writing a comment that includes
the token `/notexpired`. About two weeks before considered expired, the issue is
marked with the label `stale`, trying to notify the submitter and everyone else
that might be interested in it. To remove the label `stale`, write a comment that
includes the token `/notstale`. Also, any comment postpone the `expire` timeline,
being considered that there is interest in pursuing the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
I see unexpected return code from route if there is no explicit `return` and switch-case block.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
#### Reproduction
Here is simple configuration part:
```
route(TEST_ROUTE_WITH_SWITCH);
xlog("L_WARN", "TEST_ROUTE_WITH_SWITCH result $rc\n");
...
route[TEST_ROUTE_WITH_SWITCH] {
$var(a) = "a";
switch ($var(a)) {
case "a":
case "b":
$var(b) = $var(a);
break;
default:
$var(c) = $var(a);
}
# must be optional according to documentation:
# https://www.kamailio.org/wiki/cookbooks/5.3.x/core#return
# > If no value is specified, or a route reaches its end without executing a return statement, it returns 1.
#
# return 1;
}
```
Log:
```
WARNING: <script>: TEST_ROUTE_WITH_SWITCH result 0
```
At the same time if there is no switch-block, return code is 1 as expected:
```
route[TEST_ROUTE_WITH_SWITCH] {
$var(a) = "a";
}
```
Log:
```
WARNING: <script>: TEST_ROUTE_WITH_SWITCH w/o switch-case result 1
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
$ ./build/sbin/kamailio -v
version: kamailio 5.7.5 (x86_64/linux) b47500-dirty
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: b47500 -dirty
compiled on 22:02:13 Nov 9 2024 with /usr/bin/gcc 11.3.1
```
* **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`)
-->
```
Oracle Linux 9
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4088
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4088(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
- [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
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
This PR fixes a logic error where "flow failed" could also be triggered, when the call was ringing and has not been answered...
(according to https://www.kamailio.org/docs/modules/stable/modules/tm.html#tm.f.t_branch_… )
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4087
-- Commit Summary --
* outbound/doc: Fix logic error
-- File Changes --
M src/modules/outbound/doc/outbound_admin.xml (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4087.patchhttps://github.com/kamailio/kamailio/pull/4087.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4087
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4087(a)github.com>
### Description
In Prometheus there is the possibility to tag values with tags. Those tags can then be used provide context to those values, for example to filter them.
### Expected behavior
It would be great if there was a way to provide custom tags to the metrics. These would essentially just be a static string between the name of the metric and its value.
Example:
`system_load15{host="wurst23.dev.sipgate.net",hostname_short="wurst32"} 0.4`
This could probably be achieved by having an `xhttp_prom_ending` parameter similar to the `xhttp_prom_beginning` as we essentially just want to append a static string right after the metric name.
#### Actual observed behavior
`kamailio_sip_lb_de_core_rcv_replies_1xx_invite 1773 1731419851663`
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4021
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4021(a)github.com>
- allows custom tags to be added to prometheus metrics
- Addresses GH issue #4021
<!-- 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 -->
- [X] PR should be backported to stable branches
- [X] Tested changes locally
- [X] Related to issue #4021
#### Description
<!-- Describe your changes in detail -->
This change adds a new parameter `xhttp_prom_tags`. It allows the user to append tags to the prometheus metrics. This makes those metrics a lot more useful when having multiple kamailio instances running on a single host.
This is done by 2 shared memory helper variables which contain the parameter in different formats. This way it is easy to print them out with minimal changes.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4073
-- Commit Summary --
* xhttp_prom: new xhttp_prom_tags paramete
-- File Changes --
M src/modules/xhttp_prom/doc/xhttp_prom_admin.xml (25)
M src/modules/xhttp_prom/prom.c (30)
M src/modules/xhttp_prom/xhttp_prom.c (50)
M src/modules/xhttp_prom/xhttp_prom.h (15)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4073.patchhttps://github.com/kamailio/kamailio/pull/4073.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4073
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4073(a)github.com>
Hi There,
We found a situation where topos seems to break, let me explain... Assuming the following scenario:
```
Caller ---- Callee
A: ------INVITE-----> Record-Route:A.A.A.A, Record-Route:B.B.B.B
B: <-----200 OK------
C: <-----INVITE------ Route: A.A.A.A, B.B.B.B
D: ------200 OK-----> Record-Route:B.B.B.B, Record-Route:A.A.A.A (reversed order)
E: <======INVITE===== Route: B.B.B.B, A.A.A.A (wrong)
```
A and B establish the connection from caller to callee, and topos works fine.
C (re-INVITE from callee) sends the Route header according to the Record-Routes from the original INVITE (A)
D is the 200 OK sent from the caller to the first re-INVITE (C) coming from the callee, with the Record-Route headers reversed, because is the order in which the callee received them; and according to the RFC it's working as intended:
```
When a UAS responds to a request with a response that establishes a
dialog (such as a 2xx to INVITE), the UAS MUST copy all Record-Route
header field values from the request into the response (including the
URIs, URI parameters, and any Record-Route header field parameters,
whether they are known or unknown to the UAS) and MUST maintain the
order of those values.
[...]
[When a UAC receives a response...]
The route set MUST be set to the list of URIs in the Record-Route
header field from the response, taken in reverse order and preserving
all URI parameters.
```
E takes the Route order from the last 200 OK ignoring they are in reversed order and assuming the top one is the first one, when it should be the other way around, sending to an IP address not reachable from the callee. And I think here is the issue, topos should not update the path on the Record-Routes from a 200 OK but if it does, it should take the reverse order
When disabling topos, everything works fine, or with topos enabled, by setting rr_update=0 works for us, but what if there is a real path update, rr_update=0 wouldn't work for us anymore. The Kamailio version is 5.8.0-rc0
Let me know if you need more information.
Thanks a lot,
Javi
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3778
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3778(a)github.com>