http://www.voip-info.org/wiki-Asterisk+variables
http://www.voip-info.org/wiki-Asterisk+Dialplan+Globals
Beware with the variable scope, if its scope is local the values can
be lost, so declare the variable as global when its value must persist
between calls.
[globals]
FOOBAR => NO
[some_con
Klaus Darilion schrieb:
> I use the following condition:
>
> if (${FOOBAR}=YES) {
>...
> }
>
> The problem is, that if FOOBAR is not defined at all Asterisk generates
> a warning:
>
> WARNING[11982]: ast_expr2.fl:407 ast_yyerror: ast_yyerror(): syntax
> error: syntax error, unexpected '='
Initialize FOOBAR to some know value (ie NO) and change it when you need
to. Then it will always be defined.
Klaus Darilion wrote:
> Hi!
>
> I use the following condition:
>
> if (${FOOBAR}=YES) {
>...
> }
>
> The problem is, that if FOOBAR is not defined at all Asterisk generates
> a warni
On Thu, 2009-01-08 at 19:24 +0100, Klaus Darilion wrote:
> Hi!
>
> I use the following condition:
>
> if (${FOOBAR}=YES) {
>...
> }
>
> The problem is, that if FOOBAR is not defined at all Asterisk generates
> a warning:
>
> WARNING[11982]: ast_expr2.fl:407 ast_yyerror: ast_yyerror(): syn
Klaus Darilion wrote:
> Hi!
>
> I use the following condition:
>
> if (${FOOBAR}=YES) {
>...
> }
>
> The problem is, that if FOOBAR is not defined at all Asterisk generates
> a warning:
>
> WARNING[11982]: ast_expr2.fl:407 ast_yyerror: ast_yyerror(): syntax
> error: syntax error, unexpected
Hi!
I use the following condition:
if (${FOOBAR}=YES) {
...
}
The problem is, that if FOOBAR is not defined at all Asterisk generates
a warning:
WARNING[11982]: ast_expr2.fl:407 ast_yyerror: ast_yyerror(): syntax
error: syntax error, unexpected '=', expecting $end; Input:
=YES
Of course