<!--
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>
#### 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>
**Description**
The `secfilter` module in `kamcmd` currently allows duplicate entries when adding values to certain lists (e.g., blacklists, whitelists). This can lead to unexpected behavior and potential inconsistencies. Could you clarify the reason behind accepting duplicate values?
Recently, I submitted a pull request to add delete commands to the `secfilter` module #4089. When a user, for example, executes:
`kamcmd secfilter.del_bl user 1005`
I iterate through the entire list to ensure all occurrences of `1005` are removed, as I realized duplicates might exist. This is inefficient and could be avoided by preventing duplicates in the first place.
**Proposed Solutions**
1. **Prevent Duplicates in Existing `add` Commands:**
* I can modify existing `add` commands to directly prevent the addition of duplicate values. This would simplify future operations and improve performance.
2. **Introduce New `add_unique` Commands:**
* I can maintain the current `add` commands for backward compatibility.
* I can introduce new `add_unique` commands (e.g., `secfilter.add_bl_unique`) that explicitly reject duplicate entries.
**Recommendation**
I recommend implementing the first solution (preventing duplicates in existing `add` commands) as it provides the most straightforward and efficient approach.
**Further Considerations**
* Consider adding a check for duplicates during the `add` operation and returning an appropriate error message if a duplicate is encountered.
* Document the behavior of duplicate values in the `secfilter` module's documentation.
**I would appreciate your feedback and guidance on the best course of action.**
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4091
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4091(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
##### **Summary**
This update introduces new functionality to the `secfilter` module, enabling the removal of entries from both the Blacklist and Whitelist. It also includes automatic detection and removal of duplicate values from these lists.
##### **Details**
* Users can now remove specific entries from the Blacklist or Whitelist based on type (e.g., IP, domain, user) and a given value.
* Supports removal of single or multiple matching entries in one operation.
##### **Benefits**
- Improves the usability and flexibility of the `secfilter` module by allowing fine-grained control over list management.
- Ensures that the Blacklist and Whitelist are kept clean and free from redundant entries.
- Enhances performance by reducing unnecessary duplication in the lists.
##### Testing
This feature was tested using `kmcmd` commands in various scenarios:
- Removing the **first element** in the list.
- Removing an element from the **middle** of the list.
- Removing the **last element** in the list.
- Removing **all matching elements** in the list.
In all cases, the commands worked correctly, and the lists were updated and cleaned as expected.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4089
-- Commit Summary --
* secfilter: support remove rule in Whitelist and Blacklist
-- File Changes --
M src/modules/secfilter/secfilter.c (8)
M src/modules/secfilter/secfilter.h (3)
M src/modules/secfilter/secfilter_db.c (106)
M src/modules/secfilter/secfilter_rpc.c (95)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4089.patchhttps://github.com/kamailio/kamailio/pull/4089.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4089
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4089(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)
- [ ] 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)
- [ ] 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
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4090
-- Commit Summary --
* examples: fix kamailio ims cfg file for basic volte call
-- File Changes --
M misc/examples/ims/icscf/icscf.cfg.sample (12)
M misc/examples/ims/icscf/icscf.xml.sample (6)
M misc/examples/ims/icscf/kamailio.cfg (32)
M misc/examples/ims/pcscf/kamailio.cfg (182)
M misc/examples/ims/pcscf/pcscf.cfg.sample (55)
M misc/examples/ims/pcscf/pcscf.xml.sample (6)
M misc/examples/ims/pcscf/route/mo.cfg (99)
M misc/examples/ims/pcscf/route/mt.cfg (101)
M misc/examples/ims/pcscf/route/register.cfg (198)
M misc/examples/ims/pcscf/route/rtp.cfg (90)
M misc/examples/ims/scscf/kamailio.cfg (115)
M misc/examples/ims/scscf/scscf.cfg.sample (24)
M misc/examples/ims/scscf/scscf.xml.sample (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4090.patchhttps://github.com/kamailio/kamailio/pull/4090.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4090
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4090(a)github.com>
Executing `make clean` in the `build` folder deletes the `README` files from the modules folders.
This is probably because the README is an output of a `cmake-make` command. What would be the best option to skip this removing?
I found:
- https://stackoverflow.com/questions/6259372/cmake-preventing-make-clean-fro…
Which indicates adding:
```
SET_DIRECTORY_PROPERTIES(PROPERTIES CLEAN_NO_CUSTOM 1)
```
In the CMakeLists.txt inside the module folders. But maybe it is another place where it can be done once for all modules, or another option...
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4084
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4084(a)github.com>
Module: kamailio
Branch: master
Commit: 2692148d92bb8b17709eb4cbddd8e653bbf5c14a
URL: https://github.com/kamailio/kamailio/commit/2692148d92bb8b17709eb4cbddd8e65…
Author: Xenofon Karamanos <xk(a)gilawa.com>
Committer: Xenofon Karamanos <xk(a)gilawa.com>
Date: 2024-12-30T15:57:40Z
cmake: Install README from source tree
- module_name_doc target will only produce the formats found in the build folder.
- module_name_readme target that modifies the source tree needs to be called explicitly
---
Modified: cmake/modules-docs.cmake
---
Diff: https://github.com/kamailio/kamailio/commit/2692148d92bb8b17709eb4cbddd8e65…
Patch: https://github.com/kamailio/kamailio/commit/2692148d92bb8b17709eb4cbddd8e65…
---
diff --git a/cmake/modules-docs.cmake b/cmake/modules-docs.cmake
index b24ae061af2..edd7e8451d7 100644
--- a/cmake/modules-docs.cmake
+++ b/cmake/modules-docs.cmake
@@ -95,7 +95,6 @@ function(docs_add_module module_name)
add_custom_target(
${module_name}_doc
DEPENDS ${module_name}_doc_text ${module_name}_doc_html
- ${module_name}_readme
COMMENT "Processing target ${module_name}_doc")
# Each version has seperate custon commands for not recompiling all if 1 gets
@@ -146,13 +145,9 @@ function(docs_add_module module_name)
endif()
install(
- FILES ${CMAKE_CURRENT_BINARY_DIR}/${module_name}/${module_name}.txt
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/${module_name}/README
RENAME README.${module_name}
DESTINATION ${CMAKE_INSTALL_DOCDIR}/modules
- COMPONENT kamailio_docs
- # Since the depepndencies might not have been build as they are not in the
- # default target and required to build explicitly using `make
- # kamailio_docs`, allow them to be optional.
- OPTIONAL)
+ COMPONENT kamailio_docs)
endif()
endfunction()