GotoIfTime()

Verzweigt bedingt, abhängig von Zeit und Tag.

GotoIfTime(Zeit,Wochentag,Monatstag,Monat?[[Context,]Extension,]Prio)

Verzweigt zu der angegebenen Priorität, falls die aktuelle Zeit in das angegebene Muster fällt. Jedes Element kann auch als * (für immer) oder als Spanne (mit -) definiert werden.

Die Parameter zu dieser Anwendung sind:

Uhrzeit-Spanne
Zeitintervall, im 24-Stunden-Format mit Minuten, z.B. 9:00-17:00
Wochentag
Wochentage (mon, tue, wed, thu, fri, sat, sun), z.B. mon-fri
Monatstag
Tag des Monats (1-31), z.B. 1-15
Monat
Monate (jan, feb, mar, apr, mai, jun, jul, aug, sep, oct, nov, dec), z.B. apr-oct
; Während der Öffnungszeiten zum Context incoming-geoeffnet springen.
; Wir haben montags-freitags von 9 bis 18 Uhr geöffnet:
exten => s,1,GotoIfTime(09:00-17:59,mon-fri,*,*?incoming-geoeffnet,s,1)
; außerdem samstags von 9 bis 12:
exten => s,n,GotoIfTime(09:00-11:59,sat,*,*?incoming-geoeffnet,s,1)
; Außerhalb der Öffnungszeiten zum Context incoming-geschlossen:
exten => s,n,Goto(incoming-geschlossen,s,1)
[Anmerkung]Anmerkung

Interner Hilfetext zu dieser Applikation in Asterisk 1.4: 

  -= Info about application 'GotoIfTime' =- 

[Synopsis]
Conditional Goto based on the current time

[Description]
  GotoIfTime(<times>|<weekdays>|<mdays>|<months>?[[context|]exten|]priority):
This application will have the calling channel jump to the specified location
in the dialplan if the current time matches the given time specification.

Differenz zum internen Hilfetext in Asterisk 1.2: 

9,10c9,12
< This application will have the calling channel jump to the specified location
< in the dialplan if the current time matches the given time specification.
---
> This application will have the calling channel jump to the speicified location
> int the dialplan if the current time matches the given time specification.
> Further information on the time specification can be found in examples
> illustrating how to do time-based context includes in the dialplan.

Siehe auch. GotoIf(), ExecIfTime(), IFTIME()


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

Das gedruckte Buch