Name

ExecIf() — Conditionally executes an Asterisk application

Synopsis

ExecIf(expression,application,arguments)

If expression is true, executes the given application with arguments as its arguments, and returns the result. For more information on Asterisk expressions, see Chapter 6 or the channelvariables.txt file in the doc/ subdirectory of the Asterisk source.

If expression is false, execution continues at the next priority.

exten => 123,1,ExecIf($[ ${CALLERIDNUM} = 101 ],SayDigits,12345)
exten => 123,2,SayDigits(6789)

See Also

The EVAL, Exec(), TryExec()

Get Asterisk: The Future of Telephony, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.