Asterisk Project : Application_GotoIf

Asterisk Project : Application_GotoIf This page last changed on Jun 18, 2011 by wikibot. # GotoIf() ### Synopsis Conditional goto. ### Description This application will set the current context, extension, and priority in the channel structure based on the evaluation of the given condition. After this application completes, the pbx engine will continue dialplan execution at the specified location in the dialplan. 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 is performed, and the execution passes to the next instruction. If the target location is bogus, and does not exist, the execution engine will try to find and execute the code in the `i` (invalid) extension in the current context. If that does not exist, it will try to execute the `h` extension. If neither the `h` nor `i` extensions have been defined, the channel is hung up, and the execution of instructions on the channel is terminated. Remember that this command can set the current context, and if the context specified does not exist, then it will not be able to find any 'h' or 'i' extensions there, and the channel and call will both be terminated!. ### Syntax
    GotoIf(condition?[labeliftrue][:labeliffalse])
##### Arguments `condition` `destination` `labeliftrue` - Continue at labeliftrue if the condition is true. `labeliffalse` - Continue at labeliffalse if the condition is false. ### See Also Application_Goto Application_GotoIfTime Application_GosubIf Application_MacroIf ### Import Version This documentation was imported from Asterisk version SVN-branch-1.8-r324178.

Document generated by Confluence on Oct 04, 2011 12:42