Summary:ASTERISK-05497: ast_expr2.fl Expression Parser Errors
Reporter:denon (denon)Labels:
Date Opened:2005-11-07 14:06:56.000-0600Date Closed:2011-06-07 14:02:38
Versions:Frequency of
Description:When I do something like:
exten => 102,n,While($[ ${DB(foo/callforward)} > 1 ])  

I get:
Nov  7 13:56:10 WARNING[7836]: ast_expr2.fl:176 ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected TOK_GT, expecting TOK_MINUS or TOK_COMPL or TOK_LP or TOKEN; Input:
 > 2
Nov  7 13:56:10 WARNING[7836]: ast_expr2.fl:180 ast_yyerror: If you have questions, please refer to doc/README.variables in the asterisk source.

I see similar issues on ExecIF, using the same parser I assume.  I did a quick search of the bugtracker and didn't see this reported elsewhere.
Comments:By: Tilghman Lesher (tilghman) 2005-11-07 15:30:09.000-0600

That would mean that the associated DB key does not exist.  The usual method for getting around this is the following:

exten => 102,n,While($[ 0${DB(foo/callforward)} > 1 ])

Since octal interpretation has been turned off, this works as you want.