Gelson Dias Santos
2004-Jul-06 13:18 UTC
[Asterisk-Users] multiple days on a GotoIfTime command?
I?m trying to setup a dial rule where I need to evaluate the day of month. Here is an example: exten => 4,1,GotoIfTime(16:01-07:59|*|14,17,18,20,23,26,29|jul?6) I found it doesn?t work. Is it possible to specify more than one day on the same line, or do I need to include one line for each day? I known I can use ranges but even then I?ll end up with around 25 lines for each month. I?m trying to simplify maintenance of this rules, because I?ll have to change it each month. Thanks for any tip/suggestion. Gelson
What are you trying to do? What is the end result and what hours are you open? bkw> -----Original Message----- > From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users- > admin@lists.digium.com] On Behalf Of Gelson Dias Santos > Sent: Tuesday, July 06, 2004 3:19 PM > To: asterisk-users@lists.digium.com > Subject: [Asterisk-Users] multiple days on a GotoIfTime command? > > I´m trying to setup a dial rule where I need to evaluate the day of > month. Here is an example: > > exten => 4,1,GotoIfTime(16:01-07:59|*|14,17,18,20,23,26,29|jul?6) > > I found it doesn´t work. Is it possible to specify more than > one day on the same line, or do I need to include one line for each day? > I known I can use ranges but even then I´ll end up with around 25 > lines for each month. > I´m trying to simplify maintenance of this rules, because I´ll have > to > change it each month. > Thanks for any tip/suggestion. > > Gelson > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@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
Gelson Dias Santos
2004-Jul-06 14:03 UTC
[Asterisk-Users] multiple days on a GotoIfTime command?
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. Gelson> > bkw > > >>-----Original Message----- >>From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users- >>admin@lists.digium.com] On Behalf Of Gelson Dias Santos >>Sent: Tuesday, July 06, 2004 3:19 PM >>To: asterisk-users@lists.digium.com >>Subject: [Asterisk-Users] multiple days on a GotoIfTime command? >> >> I?m trying to setup a dial rule where I need to evaluate the day of >>month. Here is an example: >> >>exten => 4,1,GotoIfTime(16:01-07:59|*|14,17,18,20,23,26,29|jul?6) >> >> I found it doesn?t work. Is it possible to specify more than >>one day on the same line, or do I need to include one line for each day? >> I known I can use ranges but even then I?ll end up with around 25 >>lines for each month. >> I?m trying to simplify maintenance of this rules, because I?ll have >>to >>change it each month. >> Thanks for any tip/suggestion. >> >> Gelson >> >>_______________________________________________ >>Asterisk-Users mailing list >>Asterisk-Users@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 > > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@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
Roger Gulbranson
2004-Jul-06 14:19 UTC
[Asterisk-Users] multiple days on a GotoIfTime command?
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.