[asterisk-dev] Re: Is that a bug?

Tony Mountifield tony at softins.clara.co.uk
Thu Feb 2 13:29:42 MST 2006


In article <43E25134.5020103 at ipercom.com>,
Benoît Mérouze <benoit.merouze at ipercom.com> wrote:
>  From extensions.conf installed by AMP:
> 
> exten => s,5,GotoIf($[${CHANNEL:0:5} = Local]?s-${DIALSTATUS},1)
> 
> This line produces a warning in asterisk logs:
> 
> WARNING[12858] ast_expr2.fl: ast_yyerror(): syntax error: syntax error, 
> unexpected TOK_EQ, expecting TOK_MINUS or TOK_COMPL or TOK_LP or TOKEN; 
> Input:
> IAX2/ = Local
>       ^
> 
> Is that normal?

It is the / from the channel name that is causing the problem.

I think the line ought to be (assuming Asterisk 1.2):

exten => s,5,GotoIf($[${CUT(CHANNEL,/,1)} = Local]?s-${DIALSTATUS},1)

I guess it's a bug in AMP.

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-dev mailing list