<!-- 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
- [X] Related to issue #3297
#### Description
<!-- Describe your changes in detail -->
The setup is a kamailio with no available rtpengine. (e.g. has a list with rtpengine urls but those are not reachable)
Recently had a crash similar to #3297, but in an outdated kamailio version (5.5.7). Tried to reproduce this in 5.5.7 and 5.8.3 but could not crash any of them. However I managed to get the logs similar to ones right before the crash happened:
```
2024-10-04T17:39:58.026206+03:00 kamailio[450237]: ERROR: {1 1 INVITE 203-450290(a)192.168.100.93} <core> [core/action.c:1595]: run_actions(): alert - action [corefunc (16)] cfg [/home/stefan/kamailio.cfg:625] took too long [29310906 us]
```
...directly related to how much rtpengine_manage() function took to execute. So routing of SIP is delayed by that ammount.
Tracked this in code, down to where this lock is get, when "aggressive_redetection" modparam is enabled: https://github.com/kamailio/kamailio/blob/66fe6eb71e58a02222d1a2fb00f9a0cdb…
I will double check that part of the code, since I don't think a lock get is necessary. It only updates a value inside a node, inside the list of nodes, but not changes the list links at all. (this in another PR)
For now I propose to disable this aggressive_redetection mechanism by default. Since it delays the SIP routing logic when no rtpengines available (and in some cases lead to crashes in transaction module).
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3992
-- Commit Summary --
* rtpengine: disable aggressive redetection by default
-- File Changes --
M src/modules/rtpengine/config.c (2)
M src/modules/rtpengine/doc/rtpengine_admin.xml (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3992.patchhttps://github.com/kamailio/kamailio/pull/3992.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3992
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3992(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
- Enable `app_python3s` module to build with Free Threading CPython builds
- Can be gated with `-DKSR_PYTHON_DISABLE_FREETHREADING`
- If Python is a non-free-threading build this change has no effect
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3987
-- Commit Summary --
* app_python3s: initial support for free-threading Python
-- File Changes --
M src/modules/app_python3s/apy3s_kemi.c (5)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3987.patchhttps://github.com/kamailio/kamailio/pull/3987.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3987
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3987(a)github.com>
Module: kamailio
Branch: master
Commit: 62b4ee4a0d0b62b35c8bdf67e5daf9cbe9a28499
URL: https://github.com/kamailio/kamailio/commit/62b4ee4a0d0b62b35c8bdf67e5daf9c…
Author: S-P Chan <shihping.chan(a)gmail.com>
Committer: S-P Chan <shihping.chan(a)gmail.com>
Date: 2024-10-19T10:15:34+08:00
app_python3s: refactor GIL and thread state handling
* incorrectly using PyGILState_XXX functions; these functions are
for threads launched by Python unaware libraries
* if the KEMI script used Python threading these threads would be
blocked after returning to the Kamailio event loop as the GIL
was not released
Fix is to use Py_BLOCK|UNBLOCK_THREADS macros
---
Modified: src/modules/app_python3s/app_python3s_mod.c
Modified: src/modules/app_python3s/apy3s_kemi.c
---
Diff: https://github.com/kamailio/kamailio/commit/62b4ee4a0d0b62b35c8bdf67e5daf9c…
Patch: https://github.com/kamailio/kamailio/commit/62b4ee4a0d0b62b35c8bdf67e5daf9c…
#### Kamailo 5.8
### Description
I use ```ds_is_active function()``` in ```dispatcher``` module.
```
$var(sip_url) = $sht(conf_fs=>$var(conf_id)); # sip:192.168.1.44:5060
if(ds_is_active("1", "$var(sip_url)")){
#### is allways run
}
```
or
```ds_is_active("1", $var(sip_url))```
#### Debugging Data
When I check dispatcher:
```
"DEST": {
"URI": "sip:192.168.1.44:5060",
"FLAGS": "IP",
"PRIORITY": 0,
"ATTRS": {
"BODY": "rweight=50;weight=50;cc=1",
"DUID": null,
"MAXLOAD": 0,
"WEIGHT": 50,
"RWEIGHT": 50,
"SOCKET": null,
"SOCKNAME": null,
"OBPROXY": null
}
}
```
Why is the flag set to ```IP```, but ```ds_is_active()``` returns true?
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4001
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4001(a)github.com>
Running compiled Kamailio 5.8.1 (previously 5.8.0) on Debian 12 64-bit
We're seeing an issue with UDP endpoints (this issue does not happen with TCP and TLS) where usrloc will not send OPTIONS packet keepalives.
Here are all of our usrloc parameters:
modparam("usrloc", "db_mode", 0)
modparam("usrloc", "ka_domain", "SIPDOMAIN") #-- SIPDOMAIN is a fqdn
modparam("usrloc", "ka_from", "sip:proxy-ping@SIPDOMAIN")
modparam("usrloc", "ka_mode", 1)
modparam("usrloc", "timer_interval", 20) #-- How often to qualify endpoints and clean mem tables?
modparam("usrloc", "timer_procs", 4)
modparam("usrloc", "ka_randomize", 10)
modparam("usrloc", "use_domain", 0)
modparam("usrloc", "server_id_filter", 1)
modparam("usrloc", "ka_filter", 0)
modparam("usrloc", "ka_timeout", 60) #-- How quickly to expire a contact if it does not reply to keepalive?
modparam("usrloc", "matching_mode", 0)
modparam("usrloc", "handle_lost_tcp", 1)
modparam("usrloc", "close_expired_tcp", 1)
modparam("usrloc", "desc_time_order", 1)
modparam("usrloc", "hash_size", 14)
It seems usrloc is not actually using timer_interval at all for UDP devices. However, it does seem to be sending OPTIONS every 20 seconds on TCP/TLS. (this is confirmed via packet capture on a SIP phone).
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3844
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3844(a)github.com>