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

Ronald Wiplinger ronald.wiplinger at agptelecom.com
Sun Nov 7 19:44:29 MST 2004


On Monday 08 November 2004 10:36, Joseph wrote:
> 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]

as I understand not. Each chapter is for itself. If you want the next chapter 
include, than you have to use the include statement.
In your case it makes no sense to include with time and afterwards without 
time. I believe you would like:

include => open|10:00-17:59|mon-fri|*|*
include => closed
[open]
....
[closed]
....

I am also not sure if the syntax is correct, ... 

bye

Ronald


>
> 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
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
Ronald Wiplinger
Senior Software Engineer
AGP Telecom Co. Ltd.
Tel. (O) +886-2-2741-7890 # 7303, (M) +886-939-77-55-16
(from USA dial (408)253-3153 # 7303)

-----------------------------------------Disclaimer-------------------------------------------------------

This document is intended for transmission to the named recipient only. If you 
are not that person, you should note that legal rights reside in this 
document and you are not authorized to access, read, disclose, copy, use or 
otherwise deal with it and any such actions are prohibited and may be 
unlawful. The views expressed in this document are not necessarily those of 
AGP Telecom Co., Ltd. Notice is hereby given that no representation, contract 
or other binding obligation shall be created by this e-mail, which must be 
interpreted accordingly. Any representations, contractual rights or 
obligations shall be separately communicated in writing and signed in the 
original by a duly authorized officer of the relevant company. 
----------------------------------------------------------------------------------------------------------



More information about the asterisk-users mailing list