[asterisk-bugs] [Asterisk 0014710]: error/warnings for difficult if() statement in AEL
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri May 22 13:36:43 CDT 2009
The following issue has been UPDATED.
======================================================================
https://issues.asterisk.org/view.php?id=14710
======================================================================
Reported By: caspy
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 14710
Category: PBX/pbx_ael
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Asterisk Version: 1.6.0.6
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
Resolution: no change required
Fixed in Version:
======================================================================
Date Submitted: 2009-03-20 09:40 CDT
Last Modified: 2009-05-22 13:36 CDT
======================================================================
Summary: error/warnings for difficult if() statement in AEL
Description:
I have such code in AEL config:
if ($[${LEN(${var})} = 0] | $[${LEN(${var})} = 4] | $["${var}" = "value"])
{
It is successfully converted into dialplan command, that's work like
expected:
GotoIf($[$[${LEN(${var})} = 0] | $[${LEN(${var})} = 4] | $["${var}" =
"value"]]?6:8)
But error messages are produced in log:
[Mar 20 17:30:45] WARNING[2638] ast_expr2.fl: ast_yyerror(): file
/etc/asterisk/extensions.ael, line 57, columns 7-7, if expr
'$[${LEN(${var})} = 0] | $[${LEN(${var})} = 4] | $["${var}" = "value"]':
syntax error: syntax error, unexpected '<token>', expecting $end; Input:
$[${LEN(${var})} = 0] | $[${LEN(${var})} = 4] | $["${var}" = "value"]
^
[Mar 20 17:30:45] WARNING[2638] ast_expr2.fl: If you have questions,
please refer to doc/tex/channelvariables.tex in the asterisk source.
[Mar 20 17:30:45] WARNING[2638] ael/pval.c: Warning: file
/etc/asterisk/extensions.ael, line 57-59: The expression '$[${LEN(${var})}
= 0] | $[${LEN(${var})} = 4] | $["${var}" = "value"]' is redundantly
wrapped in '$[ ]'.
seems like AEL parser can not to produce an error messages in such cases.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2009-05-22 13:36 lmadsen Resolution open => no change
required
======================================================================
More information about the asterisk-bugs
mailing list