[asterisk-users] Resetting Day/Night setting

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue Jul 7 13:21:29 CDT 2009


On Tuesday 07 July 2009 11:54:54 Jeremy Winder wrote:
> The problem is in the case of say a holiday on a Friday, when the tech
> support manager decides at the last minute to let his people go early
> and dials *280 and then leaves. Come Monday the override will still be
> in place and since call volumes are usually low in the morning, it could
> be noon or later before someone realizes something is wrong.
>
> My thought was to use cron to run a script that will check the status of
> the Day/Night Control and compare it with the Time Condition and if they
> match, set the Day/Night Control back to default (day). So in our
> holiday scenario, come 5:00pm that Friday night when the Time Condition
> would switch to "after hours" the Day/Night Control switches back to its
> default setting.
>
> Being new to voice systems, I knew how I would handle it as a Linux
> Sysadmin, I was curious how "telecom guys" would go about it.
>
> To answer your question, I believe FreePBX is using a GotoIfTime clause
> for the Time Condition but I'm not exactly sure. I'm more worried about
> giving our tech support manager the ability to override the "normal"
> dial plan without having to call me.

The way that I've implemented it when customers needed it this way was to use
a common flag either in astdb or in a database, which reflected the 1/0 state
of the day/night interface, then used a cronjob to switch the states back and
forth, knowing that a state switch could always occur prior to the automatic
switch (that is, someone could arrive early in the morning and switch the
system to day mode early or leave early and switch the system to night mode
early).

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



More information about the asterisk-users mailing list