[asterisk-bugs] [Asterisk 0014543]: AEL parser broken in 1.4 branch

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Feb 25 15:01:33 CST 2009


The following issue has been RESOLVED. 
====================================================================== 
http://bugs.digium.com/view.php?id=14543 
====================================================================== 
Reported By:                klaus3000
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   14543
Category:                   PBX/pbx_ael
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     resolved
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 178373 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-02-24 15:56 CST
Last Modified:              2009-02-25 15:01 CST
====================================================================== 
Summary:                    AEL parser broken in 1.4 branch
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)}


====================================================================== 

---------------------------------------------------------------------- 
 (0100750) svnbot (reporter) - 2009-02-25 15:01
 http://bugs.digium.com/view.php?id=14543#c100750 
---------------------------------------------------------------------- 
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 http://bugs.digium.com/view.php?id=14543)
Reported by: klaus3000
Patches:
      patch.14543 uploaded by murf (license 17)
Tested by: murf


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=178640 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-02-25 15:01 svnbot         Checkin                                      
2009-02-25 15:01 svnbot         Note Added: 0100750                          
2009-02-25 15:01 svnbot         Status                   assigned => resolved
2009-02-25 15:01 svnbot         Resolution               open => fixed       
======================================================================




More information about the asterisk-bugs mailing list