[Home]

Summary:ASTERISK-29525: PJSIP remove_existing unavailable contacts
Reporter:Joseph Nadiv (yois)Labels:
Date Opened:2021-07-20 15:08:37Date Closed:2021-09-24 09:48:51
Priority:MinorRegression?
Status:Closed/CompleteComponents:pjproject/pjsip
Versions:16.19.0 18.5.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:The current behavior of remove_existing is:
1. If enabled, the contact that will expire soonest will be removed
2. If disabled, no contacts will be removed.

This doesn't take into account contacts that have gone offline and are now unavailable.  There doesn't seem to be any use case for maintaining unavailable contacts.  Perhaps, a more intelligent process would work like this instead:
1. If enabled, first remove unavailable contacts, and if there aren't any, remove expiring soonest
2. If disabled, remove only unavailable contacts.

If changing the behavior of 'no' is unwanted, then add a 3rd option of:
remove_existing=unavailable
to create the behavior of 2 above.
Comments:By: Asterisk Team (asteriskteam) 2021-07-20 15:08:40.507-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Joshua C. Colp (jcolp) 2021-07-20 15:17:01.772-0500

Features requests without patches are not accepted through the issue tracker. Features requests are openly discussed on the mailing lists, forums, and IRC [1]. Please see the Asterisk Issue Guidelines [2] for more information on feature request and patch submission.

[1] http://asterisk.org/community/discuss
[2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines



By: George Joseph (gjoseph) 2021-07-21 07:32:58.489-0500

We also can't really delete unavailable contacts if their registration hasn't timed out yet.  They may be temporarily unavailable because of a network issue blocking OPTIONS requests and come back a short while later.  If their registration hasn't expired, their contact needs to remain in place.


By: Joseph Nadiv (yois) 2021-07-21 08:22:56.166-0500

We're not removing the unavailable contacts wholesale just because they're unavailable.

There is another device attempting to register and there's an unavailable contact holding the spot needed for the new registration.  So we're blocking a known good device because it hit max_contacts, just so that we can hold on to an unavailable device that "might" come back online?

The most common cause of this is a device behind NAT that changed port or external IP address.  remove_existing should not be needed for this common use case.  If the unavailable device comes back, max_contacts is set too low anyway, and it'll have to wait until the current contacts expire and they'll keep fighting with each other until max_contacts is increased.

By: Asterisk Team (asteriskteam) 2021-07-21 08:22:56.921-0500

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.

By: George Joseph (gjoseph) 2021-07-21 08:46:57.457-0500

OK, I see what you mean.  Still, the proper places for this discussion are the Community Forums and/or the asterisk-users mailing list.

https://community.asterisk.org/
http://lists.digium.com/mailman/listinfo/asterisk-users


By: Joseph Nadiv (yois) 2021-07-22 12:12:30.792-0500

Patch put up for review

By: Asterisk Team (asteriskteam) 2021-07-22 12:12:31.116-0500

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.

By: Friendly Automation (friendly-automation) 2021-09-24 09:48:52.134-0500

Change 16264 merged by Friendly Automation:
res_pjsip_registrar: Remove unavailable contacts if exceeds max_contacts

[https://gerrit.asterisk.org/c/asterisk/+/16264|https://gerrit.asterisk.org/c/asterisk/+/16264]

By: Friendly Automation (friendly-automation) 2021-09-24 09:48:55.819-0500

Change 16160 merged by Friendly Automation:
res_pjsip_registrar: Remove unavailable contacts if exceeds max_contacts

[https://gerrit.asterisk.org/c/asterisk/+/16160|https://gerrit.asterisk.org/c/asterisk/+/16160]

By: Friendly Automation (friendly-automation) 2021-09-24 11:47:25.076-0500

Change 16266 merged by Friendly Automation:
res_pjsip_registrar: Remove unavailable contacts if exceeds max_contacts

[https://gerrit.asterisk.org/c/asterisk/+/16266|https://gerrit.asterisk.org/c/asterisk/+/16266]

By: Friendly Automation (friendly-automation) 2021-09-24 11:48:23.679-0500

Change 16265 merged by Friendly Automation:
res_pjsip_registrar: Remove unavailable contacts if exceeds max_contacts

[https://gerrit.asterisk.org/c/asterisk/+/16265|https://gerrit.asterisk.org/c/asterisk/+/16265]