<!--
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
We are plotting the call success rate on each of our proxies.
Using the Kamailio snmpstats module, we try to obtain three counters in order to plot them on a graph:
- Total Calls
- Active Calls
- Error Calls
Most of the time, everything works well and we obtain sensible values:
`snmpwalk -c mycommunity -v 2c W.X.Y.Z 1.3.6.1.4.1.34352.3.1.3.1.3.2 -O n`
> .1.3.6.1.4.1.34352.3.1.3.1.3.2.1.0 = Gauge32: 309 -> Total Calls
.1.3.6.1.4.1.34352.3.1.3.1.3.2.2.0 = Gauge32: 95 -> Active Calls
.1.3.6.1.4.1.34352.3.1.3.1.3.2.3.0 = Gauge32: 214 -> Error calls
However, **when our proxies are facing intense peaks of failed calls in a short timespan**, sometimes, the **"Error Calls"** counter returns a value **higher than "Total Calls"**. As a result, **"Active Calls"** suddenly reaches a value close to the **maximum of a _Gauge32_** (because ${TotalCalls} - {ErrorCalls} < 0$).
`snmpwalk -c mycommunity -v 2c W.X.Y.Z 1.3.6.1.4.1.34352.3.1.3.1.3.2 -O n`
> .1.3.6.1.4.1.34352.3.1.3.1.3.2.1.0 = Gauge32: 153 -> Total Calls
.1.3.6.1.4.1.34352.3.1.3.1.3.2.2.0 = Gauge32: 4294967226 -> Active Calls
.1.3.6.1.4.1.34352.3.1.3.1.3.2.3.0 = Gauge32: 223 -> Error calls
As a result, our graphs make no more sense.
### Troubleshooting
There seems to be a bug causing Total calls to be lower than Error calls when a high number of failed calls are received in a short time window.
Moreover, there is an integer overflow resulting to the negative result of the substraction being converted to a _Gauge32_. Maybe setting it to 0 in case of a negative result would be safer ?
#### Reproduction
Using the following configuration for the snmpstats module of your Kamailio proxy:
```
# -------- snmpstats params -------
modparam("snmpstats", "snmpgetPath", "/usr/bin/")
modparam("snmpstats", "snmpCommunity", "mycommunity")
modparam("snmpstats", "sipEntityType", "proxyServer")
```
On intense peaks of failed calls, get the call success metrics using `snmpwalk` :
`snmpwalk -c mycommunity -v 2c W.X.Y.Z 1.3.6.1.4.1.34352.3.1.3.1.3.2 -O n`
> .1.3.6.1.4.1.34352.3.1.3.1.3.2.1.0 = Gauge32: 153 -> Total Calls
.1.3.6.1.4.1.34352.3.1.3.1.3.2.2.0 = Gauge32: 4294967226 -> Active Calls
.1.3.6.1.4.1.34352.3.1.3.1.3.2.3.0 = Gauge32: 223-> Error calls
### Additional Information
**Kamailio Version**:
`kamailio -v`
> version: kamailio 5.6.4 (x86_64/linux) a004cf
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_S R_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, U SE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SI ZE 65535, DEFAULT PKG_SIZE 64MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: a004cf
compiled on 16:10:41 May 22 2023 with gcc 4.4.7
* **Operating System**:
`uname -r`
> 2.6.32-279.el6.x86_64
`lsb_release -a`
> LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6.3 (Santiago)
Release: 6.3
Codename: Santiago
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4006
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4006(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>
<!-- 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
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Add new api function to dmq to get local socket. Use that in dmq_usrloc.
Sync dmq_usrloc UL_CONTACT_EXPIRE. Very useful for lost TCP connections, so contacts will be expired on all dmq nodes.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4134
-- Commit Summary --
* dmq: add new api function
* dmq_usrloc: new value for replicate_socket_info
* dmq_usrloc: add new modparam to sync UL_CONTACT_EXPIRE actions
-- File Changes --
M src/modules/dmq/bind_dmq.c (1)
M src/modules/dmq/bind_dmq.h (2)
M src/modules/dmq/dmq_funcs.c (5)
M src/modules/dmq/dmq_funcs.h (1)
M src/modules/dmq_usrloc/dmq_usrloc.c (3)
M src/modules/dmq_usrloc/doc/dmq_usrloc_admin.xml (26)
M src/modules/dmq_usrloc/usrloc_sync.c (22)
M src/modules/dmq_usrloc/usrloc_sync.h (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4134.patchhttps://github.com/kamailio/kamailio/pull/4134.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4134
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4134(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
- [X] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Few fixes to topos_htable module. To be backported in 6.0 branch.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4133
-- Commit Summary --
* topos_htable: fix xtag and add more snprintf checks
-- File Changes --
M src/modules/topos_htable/topos_htable_storage.c (25)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4133.patchhttps://github.com/kamailio/kamailio/pull/4133.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4133
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4133(a)github.com>
### Description
I am trying to configure some "default" settings in Kamailio that would be independent of the configuration file. The command-line options `--loadmodule` and `--modparam` seemed to be exactly what I was looking for.
However, I noticed that these options are processed **before** the configuration file is loaded. As a result, the `--modparam` option cannot be used separately, because the module for the specified parameter has not yet been loaded:
```
# kamailio -E -DD --modparam=corex:alias_subdomains:s:kamailio.org
0(653) ERROR: <core> [core/modparam.c:199]: set_mod_param_regex(): No module matching <corex> found
0(653) ERROR: <core> [main.c:2584]: main(): failed to set modparam: corex:alias_subdomains:s:kamailio.org
```
To address this, the module needs to be loaded first using the `--loadmodule` option. However, this causes an error if the same module is also loaded in the configuration file:
```
# kamailio -E -DD --loadmodule=corex --modparam=corex:alias_subdomains:s:kamailio.org
0(654) WARNING: <core> [core/sr_module.c:611]: ksr_load_module(): attempting to load the same module twice (/usr/lib/x86_64-linux-gnu/kamailio/modules/corex.so)
0(654) CRITICAL: <core> [core/cfg.y:4014]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 283, column 12-21: failed to load module
```
### Possible Solutions
Would it be possible to move the processing of these command-line options **after** the configuration file is loaded? And could the `--loadmodule` option ignore loading a module if it has already been loaded via the configuration file?
Another potential solution could be introducing new options, such as `--loadmodule-after` and `--modparam-after`, to specify parameters that should only be applied once the configuration file has been loaded.
What do you think about these suggestions?
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.8.4 (x86_64/linux)
```
* **Operating System**:
```
Linux 010a217cd09a 6.12.10-orbstack-00297-gf8f6e015b993 #42 SMP Sun Jan 19 03:00:07 UTC 2025 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4126
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4126(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>
#### Pre-Submission Checklist
- [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:
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
latest `make` version does not evaluate variables immediately. PR explicitly evaluates the LIBS makefile variable.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4085
-- Commit Summary --
* app_python3: evaluate LIBS variable imediately in Makefile
-- File Changes --
M src/modules/app_python3/Makefile (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4085.patchhttps://github.com/kamailio/kamailio/pull/4085.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4085
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4085(a)github.com>
<!--
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
Compiling nghttp2 is failing for me in Alpine 3.21, which uses gcc 14 (14.2.0). It looks like the issue is that the header file `nghttp2.h` need to be explicitly included in the `nghttp2_mod.c` files. This is the error when running `make` inside of `src/modules/nghttp2` (after compiling kamailio as normal):
```
/home/builder/kamailio_src/src/modules/nghttp2 # make
make: --libs: No such file or directory
make: --libs: No such file or directory
make: --libs: No such file or directory
make: --libs: No such file or directory
CC (gcc) [M nghttp2.so] nghttp2_mod.o
nghttp2_mod.c: In function 'ksr_nghttp2_send_reply':
nghttp2_mod.c:317:22: error: implicit declaration of function 'nghttp2_submit_response'; did you mean 'nghttp2_submit_response2'? [-Wimplicit-function-declaration]
317 | rv = nghttp2_submit_response(_ksr_nghttp2_ctx.session,
| ^~~~~~~~~~~~~~~~~~~~~~~
| nghttp2_submit_response2
make: *** [../../Makefile.rules:100: nghttp2_mod.o] Error 1
```
### Troubleshooting
Compilation works on Debian 12, so checked difference in `make` and `gcc` versions. Note that the `make: --libs: No such file or directory` appear to be from a different issue with `make` 4.4 not recursively expanding variables. From gcc's documentation it looks like implicit function declarations are no longer possible
https://gcc.gnu.org/gcc-14/porting_to.html
#### Reproduction
Compile Kamailio 6.0.0 (with default config), then compile the nghttp2 module
### Possible Solutions
Explicitly import `nghttp2.h` in `nghttp2_mod.c` and `nghttp2_server.c`. This is outside of my normal wheelhouse, but I was able to do this and successfully compile the module:
##### Diff for `nghttp2_mod.c`:
```
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>
+#include <nghttp2/nghttp2.h>
#include "../../core/sr_module.h"
#include "../../core/dprint.h"
```
##### Diff for `nghttp2_server.c`:
```
@@ -23,6 +23,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <nghttp2/nghttp2.h>
#include "nghttp2_server.h"
#define OUTPUT_WOULDBLOCK_THRESHOLD (1 << 16)
```
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
Kamailio 6.0.0 with gcc 14.2.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`)
-->
```
/home/builder/kamailio_src/src/modules/nghttp2 # lsb_release -a
No LSB modules are available.
Distributor ID: Alpine
Description: Alpine Linux v3.21
Release: 3.21.2
Codename: n/a
/home/builder/kamailio_src/src/modules/nghttp2 # uname -a
Linux 89562285153f 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4135
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4135(a)github.com>