[Asterisk-Users] openhours - include contexts based on time and date

Joseph syscon at interbaun.com
Sun Nov 7 19:36:23 MST 2004


I've found a nice sample on Wiki webpage context for open hours; though
I'm not certain how to implement it.
http://www.voip-info.org/tiki-index.php?page=Asterisk%20tips%20openhours

If I have a context in extension.conf:
(Sample)
[incoming]
include => holiday|*|*|1|jan
include => holiday|*|*|31|may
...
include => open|10:00-17:59|mon-fri|*|*
[open]
exten => s,1,Wait(2)
exten => s,2,Answer()
exten => s,3,BackGround(welcome)
exten => s,4,Hangup()

To my understanding if a call comes to context [incoming] in the above
example each line is executed, if it is not a holiday and time between
10-17:99 it will go to context [open]

However, my calls come from Sipura SPA43K and I think I can only forward
call to a certain number when a call comes, for example extension 888
like in the example below:

exten => 888,1,GotoIfTime(10:00-17:59|mon-fri|*|*?888,1)
exten => 888,1,Wait(2)
exten => 888,2,Answer()
exten => 888,3,BackGround(welcome)
exten => 888,4,Hangup()

Does anybody have any good samples how to implement holidays, open hours
in extension.conf?

--
#Joseph



More information about the asterisk-users mailing list