Re: [asterisk-users] AEL question: testing channel variables

2009-01-11 Thread Allann Jones
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

Re: [asterisk-users] AEL question: testing channel variables

2009-01-10 Thread Philipp Kempgen
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 '='

Re: [asterisk-users] AEL question: testing channel variables

2009-01-08 Thread Brent Vrieze
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

Re: [asterisk-users] AEL question: testing channel variables

2009-01-08 Thread Steve Murphy
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

Re: [asterisk-users] AEL question: testing channel variables

2009-01-08 Thread Julian Lyndon-Smith
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

[asterisk-users] AEL question: testing channel variables

2009-01-08 Thread Klaus Darilion
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