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

Morgan Gilroy morgan at telappliant.com
Fri Feb 3 02:03:02 MST 2006


Or you could quote it out,

exten => s,5,GotoIf($["${CHANNEL:0:5}" = Local]?s-${DIALSTATUS},1);



 > -----Original Message-----
 > From: asterisk-dev-bounces at lists.digium.com [mailto:asterisk-dev-
 > bounces at lists.digium.com] On Behalf Of Tony Mountifield
 > Sent: 02 February 2006 20:30
 > To: asterisk-dev at lists.digium.com
 > Subject: [asterisk-dev] Re: Is that a bug?
 > 
 > 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
 > _______________________________________________
 > --Bandwidth and Colocation provided by Easynews.com --
 > 
 > asterisk-dev mailing list
 > To UNSUBSCRIBE or update options visit:
 >    http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list