On Tue, 2004-07-06 at 17:03, Gelson Dias Santos wrote:
> brian wrote:
> 
> > What are you trying to do?  What is the end result and what hours are you
> > open?
> 
> 
>       Exactly what I said. Need to call a number if time and day matches what 
> is on the rule. This month I have to:
> 
>       call NUMBER1 if day = 1,2,3,4,5,8,14,17,18,20,23,26,29
>       call NUMBER2 if day = 6,9,10,11,12,15,21,27,30,31
>       call NUMBER3 if day = 7,13,16,19,22,24,25,28
> 
>       I have it working now using 31 "GotoIfTime" lines, one for each day of 
> month but I would like to optimize it. If I could group all days related 
> to a number somehow, I would end up with just three "GotoIfTime"  lines.

You are making this way too complicated.

Use DBget to retrieve a number which is the extension you want and then
dial that extension.

Have a cron job (or something similar) set the extension you want via
DBset.  You can put all of your time logic into the cron job.

There may be even simpler solutions.



_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to