[Asterisk-Users] gotoiftime - different hours

Asterisk asterisk at dotr.com
Fri Jan 14 10:49:09 MST 2005


-> New functionality for GotoIfTime <--
I want to add extra functionality to the gotoiftime function: Basically 
I want to be able to specify multiple days / times such as

GotoIfTime([9:00-17:00|mon-fri][9:00-13:00|sat]|*|*?open,s,1) -> open 
9-5 mon-fri, 9-1 on sat or
GotoIfTime([[9:00-12:00][13:00-17:00]|mon-fri][9:00-13:00|sat]|*|*?open,s,1) 
-> open 9-12 and 13-5 mon-fri, 9-1 on sat

etc etc

of course, this would also follow for months/ weeks etc. Basically, the 
[] specify a range of options within the time / day / week options

Should I raise a feature request ?

Julian.

Christopher L. Wade wrote:

> Asterisk wrote:
>
>> If I have different opening hours on different days, can I accomodate 
>> that in a single gotoiftime, or will I need to filter them out one by 
>> one ?
>>
>> For example, our hours are Mon-Fri 9:00-17:00 and Sat 09:00-13:00
>>
>> can this be done something like
>>
>> GotoIfTime([9:00-17:00|mon-fri][9:00-13:00|sat]|*|*?open,s,1) or 
>> something like that, or do I have to do:
>>
>> GotoIfTime(9:00-17:00|mon-sat]|*|*?openweek,s,1)
>>
>> [openweek]
>> s,1,GotoIfTime(9:00-13:00|sat|*|*?opensat,s,1)
>>
>> It gets really complicated if you are open different hours of each 
>> day of the week :(
>>
>> Julian
>
>
> Short answer is no - you have to use multiple GotoIfTime statements.  
> I would simply put them one right after the other in one extension - 
> your initial 's' extension.
>
> I like your syntax for letting GotoIfTime process multiple times - 
> really good idea.  Maybe post a feature request on the bug tracker and 
> myself or some * developer will implement it - don't count on a fast 
> response though.  Shouldn't be a hard one, just provide plenty of 
> syntax examples on the bug tracker.
>
> -Chris
>




More information about the asterisk-users mailing list