[Home]

Summary:ASTERISK-29990: chan_dahdi: adding ring cadences is not idempotent on dahdi restart
Reporter:N A (InterLinked)Labels:
Date Opened:2022-03-27 06:11:05Date Closed:2022-05-02 08:56:02
Priority:MinorRegression?
Status:Closed/CompleteComponents:Channels/chan_dahdi
Versions:18.6.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:DebianAttachments:
Description:Every time you run "dahdi restart", ring cadences are *added*, not *re-added* or updated.

This means running dahdi is not idempotent. If you have ring cadences configured, eventually you will start getting warnings that you've filled up all the ring cadences.

e.g.:

{noformat}
[Mar 27 05:36:48]     -- cadence 'r15' added: 2000,-4000
[Mar 27 05:36:48]     -- cadence 'r16' added: 300,200,1000,200,300,-4000
[Mar 27 05:36:48]     -- cadence 'r17' added: 800,400,800,-4000
[Mar 27 05:36:48]     -- cadence 'r18' added: 400,200,300,200,800,-4000
[Mar 27 05:36:48]     -- cadence 'r19' added: 400,200,800,200,800,-3600
[Mar 27 05:36:48]     -- cadence 'r20' added: 200,400,200,400,200,-4000
[Mar 27 05:36:48]     -- cadence 'r21' added: 800,200,400,200,800,-3600
[Mar 27 05:36:48]     -- cadence 'r22' added: 1650,-350
[Mar 27 05:36:48]     -- cadence 'r23' added: 800,200,300,200,400,-4000
[Mar 27 05:36:48]     -- cadence 'r24' added: 400,200,400,-2000
[Mar 27 05:36:48] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 125,125,2000,-4000 at line 14.
[Mar 27 05:36:48] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 250,250,500,1000,250,250,500,-4000 at line 15.
[Mar 27 05:36:48] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 125,125,125,125,125,-4000 at line 16.
[Mar 27 05:36:48] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 1000,500,2500,-5000 at line 17.
{noformat}

And then the next time around:

{noformat}
[Mar 27 05:46:52] DEBUG[1319]: config.c:2207 config_text_file_load: Parsing /etc/asterisk/chan_dahdi.conf
[Mar 27 05:46:52] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 2000,-4000 at line 3.
[Mar 27 05:46:52] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 300,200,1000,200,300,-4000 at line 4.
[Mar 27 05:46:52] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 800,400,800,-4000 at line 5.
[Mar 27 05:46:52] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 400,200,300,200,800,-4000 at line 6.
[Mar 27 05:46:52] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 400,200,800,200,800,-3600 at line 7.
[Mar 27 05:46:52] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 200,400,200,400,200,-4000 at line 8.
[Mar 27 05:46:52] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 800,200,400,200,800,-3600 at line 9.
[Mar 27 05:46:52] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 1650,-350 at line 10.
[Mar 27 05:46:52] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 800,200,300,200,400,-4000 at line 11.
[Mar 27 05:46:52] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 400,200,400,-2000 at line 12.
[Mar 27 05:46:52] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 125,125,2000,-4000 at line 14.
[Mar 27 05:46:52] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 250,250,500,1000,250,250,500,-4000 at line 15.
[Mar 27 05:46:52] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 125,125,125,125,125,-4000 at line 16.
[Mar 27 05:46:52] ERROR[1319]: chan_dahdi.c:19181 process_dahdi: Already 25 cadences; can't add another: 1000,500,2500,-5000 at line 17.
{noformat}

(As an aside, the max number of cadences is supposedly 25, but it appears to stop at 24 here.)

The only fix is to completely restart Asterisk (core restart now). However, the next time dahdi restart is run, the same thing happens all over again. Effectively, you can't run dahdi restart or ring cadences get screwed up. Restarting Asterisk is the only clean way to not fudge up the DAHDI config.
Comments:By: Asterisk Team (asteriskteam) 2022-03-27 06:11:06.515-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: Friendly Automation (friendly-automation) 2022-05-02 08:56:04.087-0500

Change 18478 merged by Joshua Colp:
chan_dahdi: Don't append cadences on dahdi restart.

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

By: Friendly Automation (friendly-automation) 2022-05-02 08:56:04.091-0500

Change 18479 merged by Joshua Colp:
chan_dahdi: Don't append cadences on dahdi restart.

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

By: Friendly Automation (friendly-automation) 2022-05-02 08:56:35.028-0500

Change 18480 merged by Joshua Colp:
chan_dahdi: Don't append cadences on dahdi restart.

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

By: Friendly Automation (friendly-automation) 2022-05-02 08:57:28.196-0500

Change 18301 merged by Joshua Colp:
chan_dahdi: Don't append cadences on dahdi restart.

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