Summary: | ASTERISK-13642: [patch]AEL parser broken in 1.4 branch | ||
Reporter: | klaus3000 (klaus3000) | Labels: | |
Date Opened: | 2009-02-24 15:56:18.000-0600 | Date Closed: | 2009-02-25 15:20:58.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | PBX/pbx_ael |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) patch.14543 | |
Description: | Hi! I use Asterisk 1.4.23 with AEL without problems. Recently I tried 1.4 branch with release SVN-branch-1.4-r178373 but now the AEL parses produces lots of errors like [Feb 24 22:44:12] WARNING[21049]: ast_expr2.fl:409 ast_yyerror: ast_yyerror(): file extensions.ael, line 262, columns 16-16, if expr '${EXISTS(${MYVARIABLE})}': syntax error: syntax error, unexpected '(', expecting $end; Input: ${EXISTS(${MYVARIABLE})} This is the config which causes the error: context aelTest { 881 => { if (${EXISTS(${MYVARIABLE})}) { Dial(SIP/user1); Verbose(dialstatus=${DIALSTATUS}); } else { Hangup(); } } } It happens with different functions, e.g: context toSIPPhones2 { 366 => { HTTPRESPONSE=${CURL(http://www.domain.at/kd/osa.php?num=1)}; [Feb 24 22:44:12] WARNING[21049]: ast_expr2.fl:409 ast_yyerror: ast_yyerror(): file extensions.ael, line 83, columns 16-78, variable declaration expr '${CURL(http://www.domain.at/kd/osa.php?num=1)}': syntax error: syntax error, unexpected '(', expecting $end; Input: ${CURL(http://www.domain.at/kd/osa.php?num=1)} | ||
Comments: | By: Steve Murphy (murf) 2009-02-25 14:54:31.000-0600 OK, I've attached a patch (patch.14543) to this bug, that fixes the problem. I'm sorry, when I made 1.4 8-bit transparent, I missed one rule in the flex input file; it didn't turn up in the AEL regression tests, because I may have no rule for this in there! I'll be soon committing this change to 1.4, and closing this bug. If you can't don't want to upgrade to 1.4 svn to fix this problem, you can use the attached patch to fix your sources. Also note: while this bug tends to generate a lot of really bad-looking warning messages, that's all they are. They do not prevent AEL from generating perfectly OK dialplan code. So, you could simply ignore these messages. Reopen if there are any problems! By: Digium Subversion (svnbot) 2009-02-25 15:01:32.000-0600 Repository: asterisk Revision: 178640 U branches/1.4/main/ast_expr2.fl U branches/1.4/main/ast_expr2f.c ------------------------------------------------------------------------ r178640 | murf | 2009-02-25 15:01:32 -0600 (Wed, 25 Feb 2009) | 17 lines This patch completes the fixes nec. to make 1.4 asterisk dialplan expressions ($[...]) 8-bit transparent While I was updating ast_expr2.fl, I missed one rule that would allow 8-bit chars to be caught in tokens; and in so doing, it absorbs the ${ sequence and messes up the checking of raw exprs by AEL. Trunk already has these changes. (closes issue ASTERISK-13642) Reported by: klaus3000 Patches: patch.14543 uploaded by murf (license 17) Tested by: murf ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=178640 By: Digium Subversion (svnbot) 2009-02-25 15:09:28.000-0600 Repository: asterisk Revision: 178641 _U trunk/ ------------------------------------------------------------------------ r178641 | murf | 2009-02-25 15:09:28 -0600 (Wed, 25 Feb 2009) | 22 lines Blocked revisions 178640 via svnmerge ........ r178640 | murf | 2009-02-25 14:00:50 -0700 (Wed, 25 Feb 2009) | 17 lines This patch completes the fixes nec. to make 1.4 asterisk dialplan expressions ($[...]) 8-bit transparent While I was updating ast_expr2.fl, I missed one rule that would allow 8-bit chars to be caught in tokens; and in so doing, it absorbs the ${ sequence and messes up the checking of raw exprs by AEL. Trunk already has these changes. (closes issue ASTERISK-13642) Reported by: klaus3000 Patches: patch.14543 uploaded by murf (license 17) Tested by: murf ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=178641 |