B.51. GotoIfTime()

Jumps to the specified priority if the time condition is met.
GotoIfTime(times,daysofweek,daysofmonth,months?[[context,]extension,]priority)
Jumps to the specified priority if the current time falls within the specified time window. Each element may be defined with a "*" (always) or a "-" (range).
Die Parameter zu dieser Anwendung sind:
times
Time interval, in 24 hour format with hours and minutes, e.g. 9:00-17:00
daysofweek
Weekdays (mon, tue, wed, thu, fri, sat, sun), e.g. mon-fri
daysofmonth
Days of the month (1-31), e.g. 1-15
months
Months of the year (jan, feb, mar, apr, mai, jun, jul, aug, sep, oct, nov, dec), e.g. apr-oct
; During business hours, jump to incoming-open context.
; We are open Monday to Friday from 9:00 to 18:00 (9 a.m. to 6 p.m.):
exten => s,1,GotoIfTime(09:00-17:59,mon-fri,*,*?incoming-open,s,1)
; Also Saturdays from 9 to 12:
exten => s,n,GotoIfTime(09:00-11:59,sat,*,*?incoming-open,s,1)
; After hours go to incoming-closed:
exten => s,n,Goto(incoming-closed,s,1)

Note

Internal help for this application 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.
diff output to internal help 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.