[Home]

Summary:ASTERISK-29292: removing extension from pjsip does not remove it from the prometheus metrics without asterisk restart
Reporter:Ugis Ulbiks (perkons)Labels:
Date Opened:2021-02-15 10:13:05.000-0600Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Resources/res_stasis
Versions:18.1.0 Frequency of
Occurrence
Related
Issues:
is related toASTERISK-30200 res_pjsip: Reloading with removal of endpoint does not remove internal endpoint
Environment:OpenBSD 6.8 asterisk-18.1.1Attachments:
Description:We had some unused extensions that have not been removed. By removing them and performing a reload they still show up in the Prometheus metrics.
I tried to reload with:

{code}
asterisk -rx 'pjsip reload'
asterisk -rx 'dialplan reload'
asterisk -rx 'reload'
{code}

For example, the extension 666 was removed from /etc/asterisk/pjsip.conf .
Afterwards a reload was performed.

The metrics for the extension are still there:
{code}
# curl -s https://asterisk.example.local:8089/metrics | grep 666          
asterisk_endpoints_state{eid="00:50:56:9f:f5:39",id="PJSIP/666",tech="PJSIP",resource="666"} 1
asterisk_endpoints_channels_count{eid="00:50:56:9f:f5:39",id="PJSIP/666",tech="PJSIP",resource="666"} 0
{code}

The metrics disappear after asterisk service restart. However, that is not a good solution as a restart will terminate any active calls, also we use ansible to do perform all configuration changes which means handlers are used, so we would like to avoid an asterisk restart handler for the reason mentioned above.
Comments:By: Asterisk Team (asteriskteam) 2021-02-15 10:13:06.660-0600

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: Kevin Harwell (kharwell) 2021-02-15 17:30:17.415-0600

Guessing this is a problem with the stasis cache as that's where it pulls the data from for endpoints.