GotoIfTime()
GotoIfTime(Zeit
,Wochentag
,Monatstag
,Monat
?[[Context
,]Extension
,]Prio
)
-
) definiert werden.Uhrzeit-Spanne
9:00-17:00
Wochentag
mon
, tue
,
wed
, thu
, fri
,
sat
, sun
), z. B.
mon-fri
Monatstag
1-15
Monat
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)
————————| 1.2 |————————| 1.4 |————————| 1.6 |————————
-= Info about application 'GotoIfTime' =-
[Synopsis]
Conditional Goto based on the current time
[Description]
GotoIfTime(<times>|<weekdays>|<mdays>|<months>?[[context|]exten|]priority):
This application will set the context, extension, and priority in the channel structure
if the current time matches the given time specification. Otherwise, nothing is done.
Further information on the time specification can be found in examples
illustrating how to do time-based context includes in the dialplan.
If the target jump location is bogus, the same actions would be taken as for Goto.
--- in Asterisk 1.2
+++ in Asterisk 1.4
@@ -9,4 +9,4 @@
if the current time matches the given time specification. Otherwise, nothing is done.
Further information on the time specification can be found in examples
illustrating how to do time-based context includes in the dialplan.
- If the target jump location is bogus, Asterisk will respond as outlined in Goto.
+ If the target jump location is bogus, the same actions would be taken as for Goto.
--- in Asterisk 1.4
+++ in Asterisk 1.6
@@ -4,9 +4,14 @@
Conditional Goto based on the current time
[Description]
- GotoIfTime(<times>|<weekdays>|<mdays>|<months>?[[context|]exten|]priority):
+ GotoIfTime(<times>,<weekdays>,<mdays>,<months>?[labeliftrue]:[labeliffalse]):
This application will set the context, extension, and priority in the channel structure
- if the current time matches the given time specification. Otherwise, nothing is done.
+ based on the evaluation of the given time specification. After this application completes,
+ the pbx engine will continue dialplan execution at the specified location in the dialplan.
+ If the current time is within the given time specification, the channel will continue at
+ 'labeliftrue'. Otherwise the channel will continue at 'labeliffalse'. If the label chosen
+ by the condition is omitted, no jump is performed, and execution passes to the next
+ instruction. If the target jump location is bogus, the same actions would be taken as for
+ Goto.
Further information on the time specification can be found in examples
illustrating how to do time-based context includes in the dialplan.
- If the target jump location is bogus, the same actions would be taken as for Goto.