[asterisk-users] Time of Day Routing

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Fri Aug 14 00:46:04 CDT 2009


On Thursday 13 August 2009 19:18:44 Edwin Lam wrote:
> Dáibhéad Antoine O'Reilligh wrote:
> > I have a logic question that is confusing me.
> >
> >          ifTime(00:00-12:00|*|*|*) {
> >
> >                 Playback(welcome-morning);
> >
> >              } else {
> >                         ifTime(12:00-18:00|*|*|*) {
> >
> >                                 Playback(welcome-afternoon);
> >
> >                         } else {
> >                                 Playback(welcome-evening);
> >
> >                         }
> >                 }
> >
> >
> > Does that cover the entire day? The question arose because of the time
> > as follows:
> >
> >    ifTime(00:00-12:00|*|*|*) { ---- so midnight to noon fine--but should
> > it be 11:59 or 12:00
> >
> > and ifTime(12:00-18:00|*|*|*) {   -- should it be from 12:01
> >
> > However doing that I assume will miss a minute.
>
> according to the wiki pages:
> <minute> = a number, 0 to 59, inclusive
> so. look back at your logic, your welcome-morning message will
> be played before 12:01. and your welcome-afternoon message will
> be played on & after 12:01.

Actually, that's 12:02, because times before 1.6.2 are only accurate down
to the 2-minute interval.  So 12:01 is treated the same as 12:00.  Starting
with 1.6.2, times are accurate down to the minute.

-- 
Tilghman & Teryl
with Peter, Cottontail, Midnight, Thumper, & Johnny (bunnies)
and Harry, BB, & George (dogs)



More information about the asterisk-users mailing list