Asterisk cmd ExecIf
Created by: JustRumours,Last modification on Fri 12 of Oct, 2007 [12:17 UTC] by chandave
ExecIf
Synopsis
Conditional execUsage:
ExecIF (<expr>|<app>|<data>)Description
If <expr> is true, execute and return the result of <app>(<data>).If <expr> is true, but <app> is not found, then the application will return a non-zero value.
It is important not to have any spaces as it does not seem to like that (gives a could not find application if spaces are present).
Also note that the separator between the expression is a comma or a vertical bar, not a question mark (as is the case with GotoIf).
Example
exten => s,n,ExecIf($[${SYSTEMSTATUS} = SUCCESS]|Background|dictate/playback)See also
- Asterisk cmd GotoIf
- Asterisk func IF
- Asterisk cmd Exec
- Asterisk cmd ExecIfTime
- Asterisk cmd System
- Asterisk cmd Agi
Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ
Comments