This describes the somewhat involved method by which the automated attendant (AA) calculates the current schedule. The schedule is used to decide which message to play to a caller. See the code here.

Merlin Mail R3 Schedule
-----------------------

The Merlin Mail R3 schedule depends on several variables:

(a) The Automated Attendant -- each has a separate schedule.
(b) The "schedule controller" -- does the schedule depend on the
    Merlin Mail business schedule, the Merlin Legend mode code, or both.
(c) The current date and time.  (We keep seven schedules, one for each day
    of the week.)
(d) In some cases, the latest Merlin Legend mode code.
(e) Any "overrides" for open or closed.

Note that overrides for a particular day are reset at 3AM on the
*next* day, but the greeting that is used depends on the current date.
For example, if Monday is temporarily closed, and the schedule follows
the Merlin Mail business schedule, callers will receive the normal
night greeting after midnight Monday; but Monday's temporary (and
no-longer-heard) closing will not be reset until 3AM Tuesday.

Merlin Mail uses this algorithm to calculate the "schedule at the moment:"

(1) Get the current day (Sunday, Monday, etc) and time.

(2) If today is a scheduled holiday closing, the schedule is "other"
    (the greeting will depend on the touch-tone gate).
    If today is an override open, the schedule is "open."
    If today is an override closed, the schedule is "closed."

(3) If the schedule is controlled by the Merlin Legend, the schedule is
    the last day or night code ever received from the Legend.
    (If no code has ever been received, the factory setting is day mode.)

(4) If the schedule is controlled by the Merlin Mail business schedule,
    and the current time is between the opening and closing times,
    then the schedule is "open";  if the current time is before opening
    or after closing, the schedule is "closed."

(5) Here's where it gets tricky.
    If the schedule is controlled by both the Merlin Legend mode codes
    *and* the Merlin Mail business schedule, then:

    (a) If today is an override closed day, but a mode code arrived today,
        then the schedule is that mode code (same as in 3).
        If the last mode code was not from today, the schedule is closed.
        (This is because the business schedule starts a new day at midnight.)

    (b) For normal days, we calculate the "most recent event:"  midnight,
        the opening time, the closing time, or a mode code.
        If the most recent event was a Merlin Mail business schedule event
        (midnight, opening, or closing), then we use the Merlin Mail
        business schedule (same as 4).
        If the most recent event was a mode code, we follow the mode code
        (same as 3).

In Merlin Mail 2.xx, the Merlin Legend mode codes simply changed the
override for the day.  A night mode code cleared any override if the
schedule was normally closed, or else set the schedule to override
closed.  A day mode code cleared any override if the day was open and
within the open hours, or else set the schedule to override open. 


dtw 09/29/95.


[Back to home page]