[asterisk-users] Time of Day Routing

Edwin Lam
Fri, 14 Aug 2009 00:18:44 -0000

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.


--
Edwin Lam <edwin.lam at officegeneral.com>
Systems Engineer, Office General, Inc.
Ph: +1 415 439 4988 Fax: +1 415 283 3370