[Home]

Summary:ASTERISK-30109: res_pjsip: no contact-status AMI event on register of prune-on-boot contact that uses the same URI as before Asterisk restart
Reporter:Michael Neuhauser (mneuhauser)Labels:
Date Opened:2022-06-14 03:52:06Date Closed:2022-07-14 09:44:05
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:16.26.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:
Description:TLS endpoint with rewrite_contact=true is registered. Asterisk is restarted. Contact is pruned by ast_sip_location_prune_boot_contacts(). If the endpoint registers again using the same remote address and port as before (i.e., same URI), then no AMI ContactStatus event is sent.

This happens because ast_sip_location_prune_boot_contacts() is called before res/res_pjsip/pjsip_options.c registers its contact sorcery observer so the contact is not removed from sip_options_contact_statuses when it is pruned.
Comments:By: Asterisk Team (asteriskteam) 2022-06-14 03:52:07.574-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: Michael Neuhauser (mneuhauser) 2022-06-14 03:56:21.356-0500

Moving the call of ast_sip_location_prune_boot_contacts() from ast_res_pjsip_initialize_configuration() in res/res_pjsip/pjsip_configuration.c to load_module() in res/res_pjsip.c, *after* the call to ast_res_pjsip_init_options_handling() fixes the problem, but I am not sure if that has unintended consequences - I will create a gerrit review.

By: Friendly Automation (friendly-automation) 2022-07-14 09:44:06.145-0500

Change 18843 merged by Friendly Automation:
res_pjsip: delay contact pruning on Asterisk start

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

By: Friendly Automation (friendly-automation) 2022-07-14 09:44:42.708-0500

Change 18681 merged by Friendly Automation:
res_pjsip: delay contact pruning on Asterisk start

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

By: Friendly Automation (friendly-automation) 2022-07-14 09:45:24.520-0500

Change 18819 merged by Friendly Automation:
res_pjsip: delay contact pruning on Asterisk start

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

By: Friendly Automation (friendly-automation) 2022-07-14 09:46:11.833-0500

Change 18840 merged by Friendly Automation:
res_pjsip: delay contact pruning on Asterisk start

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