When using rtpengine_allow_op param, return node for ongoing calls only if rtpengine is manually disabled.
When a rtpengine instance is disabled, rtpengine_allow_op will allow the indialog requests to be processed through that rtpengine. But it's not desirable to return the node when the rtpengine has unexpectedly crashed or has any undesired issues, because the rtp commands attempted cause congestion problem in the kamailio. So with this patch we only return the node if the rtpengine has been manually disabled and it's still supposed to be working.
<!-- 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 --> - [ ] 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: <!-- 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 -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2800
-- Commit Summary --
* rtpengine: On rtpengine_allow_op, return node only if rtpengine is manually disabled
-- File Changes --
M src/modules/rtpengine/rtpengine.c (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2800.patch https://github.com/kamailio/kamailio/pull/2800.diff
Looks good to me. From the documentation this feature should work like this in the first place.
But I did a review of the code, and it seems this feature was modified to actually work in the (in your opinion not desired way), but probably the docs not adapted. See below.
So probably a better idea is to introduce another mode "2" for the rtpengine_allow_op parameter which then trigger the desired behaviour.
commit 5a537506141027ca3d3ef87f49913ab628c30690 Author: Stefan Mititelu stefan.mititelu@1and1.ro Date: Mon Dec 7 13:30:02 2015 +0200
rtpengine: Allow op for all deactivated machines If allow_op modparam enabled, send commands to the disabled machines for the existing call. So far this was done only for manually deactivated machines. This is useful because there might be cases of proxy timeout, cases when you may want to still allow the operations for the existing calls.
Hello Henning
thanks for the feedback, we will study the case to create a new patch including the different modes
best regards david
El lun, 12 jul 2021 a las 15:08, 'Henning Westerholt' via descartin (< ***@***.***>) escribió:
Looks good to me. From the documentation this feature should work like this in the first place.
But I did a review of the code, and it seems this feature was modified to actually work in the (in your opinion not desired way), but probably the docs not adapted. See below.
So probably a better idea is to introduce another mode "2" for the rtpengine_allow_op parameter which then trigger the desired behaviour.
commit 5a53750 https://github.com/kamailio/kamailio/commit/5a537506141027ca3d3ef87f49913ab628c30690 Author: Stefan Mititelu ***@***.*** Date: Mon Dec 7 13:30:02 2015 +0200
rtpengine: Allow op for all deactivated machines
If allow_op modparam enabled, send commands to the disabled machines for the existing call. So far this was done only for manually deactivated machines. This is useful because there might be cases of proxy timeout, cases when you may want to still allow the operations for the existing calls.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kamailio/kamailio/pull/2800#issuecomment-878264302, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3IPOX3K6A2TVA7VWBKI3TTXLSLTANCNFSM5AGONYGQ .
@descartin pushed 1 commit.
a0cab5e4b625f04391e6152219a08a9198329ec7 rtpengine: add mode 2 for rtpengine_allow_op to return only manually disabled nodes
Thanks for the update. @rfuchs any comments on this PR? Otherwise I think it could be merged.
hello all
we have added a new commit to add mode 2 for rtpengine_allow_op param to return only manually disabled nodes We updated the documentation too.
regards
LGTM overall, except that the debug log message ("return it") now doesn't necessarily reflect what it actually does :laughing:
Merged #2800 into master.
Thanks, merged. I will push another small commit to fix the commit msg for the new mode.
@descartin in case of future pull request, please add your name and e-mail to your git config. Currently its setup like this:
Author: david you@example.com
oops, ok i didn't notice it, thank you
El mar, 13 jul 2021 a las 15:07, 'Henning Westerholt' via descartin (< ***@***.***>) escribió:
@descartin https://github.com/descartin in case of future pull request, please add your name and e-mail to your git config. Currently its setup like this:
Author: david ***@***.***
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kamailio/kamailio/pull/2800#issuecomment-879071440, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3IPOXNUNKN3NHS4EV5C23TXQ27FANCNFSM5AGONYGQ .