Asterisk shabbat mode?
Tzafrir Cohen
tzafrir at cohens.org.il
Sun Jan 17 12:44:50 IST 2010
On Sun, Jan 17, 2010 at 07:01:57AM +0200, geoffrey mendelson wrote:
>
> On Jan 17, 2010, at 2:29 AM, Tzafrir Cohen wrote:
>
>> On Sat, Jan 16, 2010 at 08:05:51PM +0200, ik wrote:
>>> You can use libhdate with some AGI and set variable to calculate
>>> shabat per
>>> place and day.
>>
>> This is relatively quite expensive. Maybe a qeekly cron to update a
>> relevant GotoIfTime line in the dialplan?
>
>
>
> Actually I'm quite happy with picking up the phone and entering an
> extension number that puts the system into shabbat mode, and doing the
> opposite motzi shabbat. What I am looking for is a way of setting a
> presistent variable, so that it knows it is in shabbat mode, and I can
> easily check it in a dial plan.
Normally the astdb is used for such persistant variables.
To set:
Set(${DB(flags/shabat)=1)
To reset:
DbDel(flags/shabat)
To test in the dialplan: the function DB_EXISTS:
GotoIf($[${DB_EXISTS(flags/shabat)}]:context-for-shabat)
>
> I'll take the chance that if there is a power glitch, the system will
> reboot in normal mode.
If that's OK, you can set a global variable instead.
--
Tzafrir Cohen | tzafrir at jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir at cohens.org.il | | best
ICQ# 16849754 | | friend
More information about the Linux-il
mailing list