Jumps to a specified priority, extension and context if a condition is satisfied.
GotoIf(condition?labeliftrue:labeliffalse)
Hands the currently active channel to the priority specified by
labeliftrue if the condition is true, or to the
priority specified in labeliffalse if the
condition is false. Either labeliftrue or
labeliffalse may be omitted (in which case
execution continues with the next priority) but not both! You must include
the colon delimiter (:).
In this case, a priority can be:
10123,10incoming,123,10okexten => 123,1,GotoIf($[ ${test} = 5 ]?ok:no)
exten => 123,10(ok),Playback(tt-monkeys)
exten => 123,20(no),Playback(tt-weasels)
|
|
|
Internal help for this application in Asterisk 1.4: -= Info about application 'GotoIf' =- [Synopsis] Conditional goto [Description] GotoIf(condition?[labeliftrue]:[labeliffalse]): This application will cause the calling channel to jump to the specified location in the dialplan ba sed on the evaluation of the given condition. The channel will continue at 'labeliftrue' if the condition is true, or 'labeliffalse' if the conditi on is false. The labels are specified with the same syntax as used within the Goto application. If the label chosen by the condition is omitted, no jump i s performed, but execution continues with the next priority in the dialpla n. diff output to internal help in Asterisk 1.2: - none - |
See also. the section called “Goto()”, the section called “GotoIfTime()”, the section called “Gosub()”, the section called “GosubIf()”, the section called “Macro()”