Goto

Da Voismart Knowledge Base.
[Synopsis]
Jump to a particular priority, extension, or context

[Description]
  Goto([[context|]extension|]priority): This application will set the current
context, extension, and priority in the channel structure. After it completes, the
pbx engine will continue dialplan execution at the specified location.
If no specific extension, or extension and context, are specified, then this
application will just set the specified priority of the current extension.
  At least a priority is required as an argument, or the goto will return a -1,
and the channel and call will be terminated.
  If the location that is put into the channel information is bogus, and asterisk cannot
find that location in the dialplan,
then 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 either or neither the 'h' or 'i' extensions have been defined, the
channel is hung up, and the execution of instructions on the channel is terminated.
What this means is that, for example, you specify a context that does not exist, then
it will not be possible to find the 'h' or 'i' extensions, and the call will terminate!

Il comando Goto permette di effettuare un salto all'interno della programmazione del dial plan

Comando: Goto

Opzioni:

Goto(priority) - Salto alla priorità specificata dell'extension corrente nel context corrente 
Goto(extension,priority) - Salto all'extension specificata con priorità specificata nel context corrente
Goto(context,extension,priority) - Salto nel context specificato all'extension specificata con priorità specificata

Es

Goto (notte,s,1) Effettua un salto nel context notte alla extension "s" con priorità 1