[Asterisk-Users] Error in config sample for GoToIf?

Brian Capouch brianc at palaver.net
Tue Jun 27 00:22:09 MST 2006


Brian Capouch wrote:

> 
> exten => s,n,GoToIf([${AVAILSTATUS} = "1"]?autoanswer:fail)
> 
> I couldn't get this to work unless I surrounded the first part of the 
> test with quotes, too, like this:
> 
> exten => s,n,GoToIf(["${AVAILSTATUS}" = "1"]?autoanswer:fail)
> 

Ooops.

Actually, I mis-pasted one of my intermediate attempts there that didn't 
work.  So sorry.  My excuse is that I've gone daft.  This is the line 
that actually seemed to branch correctly (although not with a "1" in the 
test, but that's part of another question :-))

exten => s,n,GoToIf($["${AVAILSTATUS}" = "1"]?autoanswer:fail)

Note the extra $ ahead of the leftmost brace. . .

There are many permutations of braces, dollar signs, and quote marks in 
the various examples on the Wiki, btw, many of which note that other 
examples are incorrect. . .

B.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the asterisk-users mailing list