[asterisk-users] "IF" command

Cary Fitch caryf at usawide.net
Thu Mar 19 19:20:42 CDT 2009


The only conditional command I know of in Asterisk is "GotoIF".
 
Is there a simple "IF" that doesn't have to goto anywhere?

I simply want to set a variable when a condition is met, for a specific set
of numbers, like:

exten _713NXXXXXX,IF $A = $B $C= "Houston Call"
exten _512NXXXXXX,IF $A = $B $C= "Austin Call"
exten _210NXXXXXX,IF $A = $B $C= "San Antonio Call"
exten _999NXXXXXX,IF $A = $B $C= "Bogus Call"
exten _832NXXXXXX,IF $A = $B $C= "Local Call"

or any other equivalent use.  I don't want to go anywhere, and have about 20
of those cases in a row, followed by continued processing.

It is the "IF" construct I am looking for, don't worry about the rest of the
syntax, or what A or B is.

Cary Fitch




More information about the asterisk-users mailing list