New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setting $xavp(reg=>max_contact) will limit new registration and updates, but not deleting existing ones #2471
Comments
The module behaves in another way, i think. The max_contacts parameter will disallow new registration and also update of existing registrations. But it will not remove old existing registrations by itself. The docs can be always extended to make it more clear, otherwise this is probably a feature request. |
@henningw sorry I though I hit the feature request button when creating this. |
@amessina No, actually i did a mistake in my reply, you filed it all right as feature request. |
Because the registration process in sip is periodical, but each endpoint can select its expires interval, the oldest contact may hit a valid record, for example the case of a user with a fixed end point registering every 3600 seconds and another mobile one that registers every 5 min, but because of losing the wireless connectivity it keeps adding new contacts. That was the discussion where the limit of registration was decided to be done by rejecting new registrations. Now, if you want to remove certain contacts, the oldest, older or newer, it is possible to do in config right now with reg_fetch_contacts(), then loop through contacts to decide which should be removed and do unregister() using the ruid field. Note also that there is a flag for save() to store a single contact per user, removing the existing one -- maybe that can fit in some scenarios Anyhow, if someone wants to make this option in the code controlled via modparam or function params, I am fine with it. Given that it is already possible via config operations, this feature-request should be closed unless a developer engages in adding it and wants to track the evolution here. Otherwise, a PR with implementation in the C code for a simpler config can be just submitted at any time, no need to have the FR open. |
Thank you @miconda. Based on your description, I was misunderstanding the documentation about the usage for this $xavp. I understood the documentation to mean that |
Description
I'd like to reduce the number of contacts per AOR for certain UAs, while maintaining a default higher limit.
Expected behavior
https://www.kamailio.org/docs/modules/stable/modules/registrar#registrar.p.xavp_cfg states:
I expect that the UA will register with the new contact and have all others removed.
Actual observed behavior
$xavp(reg=>max_contacts)
set to a value lower than themax_contacts
modparam does not achieve the overwrites expectation from the documentation.Log Messages
Additional Information
kamailio -v
The text was updated successfully, but these errors were encountered: