[asterisk-users] Simple Time of Day Branching problem
Doug Lytle
support at drdos.info
Tue Sep 15 07:25:03 CDT 2009
Jim Hankins wrote:
>>>
>>> exten => 345,1,Answer()
>>> exten => 345,n,GotoIfTime(10:00-17:00|tue&thu&sat|*|*?open,345,1)
>>> exten => 345,n,GotoIfTime(10:00-19:00|wed&fri|*|*?open,345,1)
>>> exten => 345,n,Playback(afterhours)
>>> exten => 345,n,Hangup()
>>>
>>>
exten => 345,1,Answer()
; *******************
; * 10am to 5pm schedule
;********************
exten => 345,n,GotoIfTime(10:00-17:00|tue|*|*?open,345,1)
exten => 345,n,GotoIfTime(10:00-17:00|thu|*|*?open,345,1)
exten => 345,n,GotoIfTime(10:00-17:00|sat|*|*?open,345,1)
; *******************
; * 10am to 7pm schedule
;********************
exten => 345,n,GotoIfTime(10:00-19:00|wed|*|*?open,345,1)
exten => 345,n,GotoIfTime(10:00-19:00|fri|*|*?open,345,1)
exten => 345,n,Playback(afterhours)
exten => 345,n,Hangup()
Or you could make a database entry via a cron job and check for that
entry to see if it's after hours.
Doug
--
Ben Franklin quote:
"Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."
More information about the asterisk-users
mailing list