[asterisk-bugs] [JIRA] (ASTERISK-29540) aelparse: include of context with timings fails

Asterisk Team (JIRA) noreply at issues.asterisk.org
Mon Aug 2 12:21:33 CDT 2021


    [ https://issues.asterisk.org/jira/browse/ASTERISK-29540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=255733#comment-255733 ] 

Asterisk Team commented on ASTERISK-29540:
------------------------------------------

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/].

> aelparse: include of context with timings fails
> -----------------------------------------------
>
>                 Key: ASTERISK-29540
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29540
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Utilities/aelparse
>    Affects Versions: 16.19.1, 18.5.1
>            Reporter: Alexander Traud
>
> The helper utility {{aelparse}} comes with its own parser for the configuration file {{extensions.conf}}. The syntax of that file changed with Asterisk 1.6.0. To be more precise, the use of the character ‘vertical bar’ was changed to the ‘comma’ (see commit [55b1ee2|https://github.com/asterisk/asterisk/commit/55b1ee298e926c594f45456e5afbc25c79e3889b]). With that change also timing information while including a context got changed
> {code}
> include => tagschaltung|09:00-17:00|mon-fri|*|*
> 
include => tagschaltung|09:00-14:00|sat|*|*
> include => anrufbeantworter
> {code}
> in Asterisk 1.4, had to be changed to commas
> {code}
> include => tagschaltung,09:00-17:00,mon-fri,*,*
> 
include => tagschaltung,09:00-14:00,sat,*,*
> include => anrufbeantworter
> {code}
> for Asterisk 1.6.0 and later. Otherwise you would get the warning
> {code}
> pbx.c […] ast_context_verify_includes: Context 'default' tries to include nonexistent context 'tagschaltung|09:00-17:00|mon-fri|*|*'
> {code}
> So far, so good. However, {{aelparse}} comes with its own parser and that particular change was not duplicated in source file {{utils/extconf.c}}. Commit [27cbfc1|https://github.com/asterisk/asterisk/commit/27cbfc1bd5b0f80de5d5968c8b1965c2252b23c1] fixed that, it ported that change over. Furthermore, it added an optional parameter. For that not the vertical bar is allowed but a comma is *required*. Consequently, the ‘main’ parser allows
> {code}
> include => tagschaltung,09:00-17:00|mon-fri|*|*,my_timezone
> {code}
> Actually, commit [27cbfc1|https://github.com/asterisk/asterisk/commit/27cbfc1bd5b0f80de5d5968c8b1965c2252b23c1] ported the changes over to {{aelparse}} but did not fix the separator between the first and second parameter.
> Long story short, the attached patch fixes {{aelparse}} to allow the comma, finally. Furthermore, it adds the possibility to use the vertical bar before the last optional parameter (the timezone name) and after the first parameter (the context name), both in {{aelparse}} and the main parser of Asterisk.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list