Springt bedingt zu der angegebenen Priorität,
GotoIf(Bedingung
?PrioWahr
:PrioFalsch
)
Schickt den Anruf ohne Möglichkeit der Rückkehr an die Priorität
PrioWahr
, falls die Bedingung
wahr ist oder zu
PrioFalsch
, falls sie falsch ist. Entweder
PrioWahr
oder PrioFalsch
können ausgelassen
werden (dann wird ggf. mit der nächsten Priorität weitergemacht), aber
nicht beide (und nicht der Doppelpunkt!).
Eine Priorität ist hier eines der Folgenden:
- eine Priorität, z.B.
10
- eine Extension und eine Priorität, z.B.
123,10
- Context, Extension und Priorität, z.B.
incoming,123,10
- eine benannte Priorität innerhalb der gleichen Extension,
z.B.
ok
exten => 123,1,GotoIf($[ ${test} = 5 ]?ok:nein) exten => 123,10(ok),Playback(tt-monkeys) exten => 123,20(nein),Playback(tt-weasels)
Anmerkung | |
---|---|
Interner Hilfetext zu dieser Applikation 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 based on the evaluation of the given condition. The channel will continue at 'labeliftrue' if the condition is true, or 'labeliffalse' if the condition 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 is performed, but execution continues with the next priority in the dialplan. Differenz zum internen Hilfetext in Asterisk 1.2: - keine - |
Siehe auch. „Goto()
“, „GotoIfTime()
“, „Gosub()
“, „GosubIf()
“, „Macro()
“
Version 1.2, November 2002
Neue Version verfügbar
Sie betrachten gerade die alte Version des Buches (Version 1.0). Wir empfehlen Ihnen für Asterisk 1.4 und 1.6 die neue Version des Buches.
Asterisk-Tag 2008
Lernen Sie Mark Spencer (den Erfinder von Asterisk) kennen! Viele Vorträge, Case-Studies und Workshops rund um das Thema VoIP. Asterisk-Tag.org