[asterisk-bugs] [JIRA] (ASTERISK-29540) aelparse: include of context with timings fails
Asterisk Team (JIRA)
noreply at issues.asterisk.org
Wed Oct 13 06:01:53 CDT 2021
[ https://issues.asterisk.org/jira/browse/ASTERISK-29540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Asterisk Team updated ASTERISK-29540:
-------------------------------------
Target Release Version/s: 19.0.0
> 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
> Assignee: Alexander Traud
> Labels: patch
> Target Release: 16.21.0, 18.7.0, 19.0.0
>
> Attachments: extensions_include_timings_v13.patch, extensions_include_timings_v16.patch
>
>
> 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