<div dir="ltr"><div class="gmail_quote">On Sun, Jan 17, 2010 at 12:44, Tzafrir Cohen <span dir="ltr"><<a href="mailto:tzafrir@cohens.org.il">tzafrir@cohens.org.il</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Sun, Jan 17, 2010 at 07:01:57AM +0200, geoffrey mendelson wrote:<br>
><br>
> On Jan 17, 2010, at 2:29 AM, Tzafrir Cohen wrote:<br>
><br>
>> On Sat, Jan 16, 2010 at 08:05:51PM +0200, ik wrote:<br>
>>> You can use libhdate with some AGI and set variable to calculate<br>
>>> shabat per<br>
>>> place and day.<br>
>><br>
>> This is relatively quite expensive. Maybe a qeekly cron to update a<br>
>> relevant GotoIfTime line in the dialplan?<br>
><br>
><br>
><br>
> Actually I'm quite happy with picking up the phone and entering an<br>
> extension number that puts the system into shabbat mode, and doing the<br>
> opposite motzi shabbat. What I am looking for is a way of setting a<br>
> presistent variable, so that it knows it is in shabbat mode, and I can<br>
> easily check it in a dial plan.<br>
<br>
</div>Normally the astdb is used for such persistant variables.<br>
<br>
To set:<br>
<br>
Set(${DB(flags/shabat)=1)<br>
<br>
To reset:<br>
<br>
DbDel(flags/shabat)<br>
<br>
To test in the dialplan: the function DB_EXISTS:<br>
<br>
GotoIf($[${DB_EXISTS(flags/shabat)}]:context-for-shabat)<br></blockquote><div><br><br>But that's have to be updated every week, or every X amount of time.<br>You can't automate Berkly insert/update without any AGI/AMI running at least once, unless you know something I do not know.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
><br>
> I'll take the chance that if there is a power glitch, the system will<br>
> reboot in normal mode.<br>
<br>
</div>If that's OK, you can set a global variable instead.<br>
<div class="im"><br>
--<br>
Tzafrir Cohen | <a href="mailto:tzafrir@jabber.org">tzafrir@jabber.org</a> | VIM is<br>
<a href="http://tzafrir.org.il" target="_blank">http://tzafrir.org.il</a> | | a Mutt's<br>
<a href="mailto:tzafrir@cohens.org.il">tzafrir@cohens.org.il</a> | | best<br>
ICQ# 16849754 | | friend<br>
<br>
_______________________________________________<br>
</div><div><div></div><div class="h5">Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
</div></div></blockquote></div><br>Ido<br><a href="http://ik.homelinux.org/">http://ik.homelinux.org/</a><br></div>