On 9/28/07, <b class="gmail_sendername">Tzafrir Cohen</b> &lt;<a href="mailto:tzafrir.cohen@xorcom.com">tzafrir.cohen@xorcom.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Fri, Sep 28, 2007 at 05:28:21PM +0100, Ade Vickers wrote:<br>&gt; Hi folks,<br>&gt;<br>&gt; I&#39;ve been playing around with an Asterisk server in my office for a few<br>&gt; weeks now, and I&#39;ve got it pretty much nailed down the way I want it, which
<br>&gt; is nice.<br>&gt;<br>&gt; One of the features I&#39;m using is the ability to switch different contexts in<br>&gt; &amp; out of the dialplan on a schedule. So, for example, I&#39;ve got the<br>&gt; &quot;official&quot; tel number ringing my desk phone between 
9.00-17.30 mon-fri; and<br>&gt; out of those hours any caller gets a recorded message + sent to voicemail.<br>&gt;<br>&gt; However, I&#39;m quite often working later than 17.30, and would quite like to<br>&gt; be able to easily &quot;flick a switch&quot; which tells Asterisk that, actually, I&#39;m
<br>&gt; here in the office, and I&#39;d quite like to receive calls. Currently, I have<br>&gt; to alter dialplans.conf, comment out a couple of lines &amp; uncomment another;<br>&gt; save &amp; then re-load the dialplan.
<br>&gt;<br>&gt; I&#39;m guessing I&#39;ve got 3 options open to me:<br>&gt;<br>&gt; 1) Convert from using the various .conf files, to using a &quot;realtime&quot; config,<br>&gt; then write a small front-end to the DB so I can access the settings from a
<br>&gt; simple switch on my Windows desktop<br>&gt; 2) Write some kind of script which I can execute on the Asterisk box which<br>&gt; makes the same changes I&#39;m currently making manually<br>&gt; 3) Some other option I&#39;ve not thought of...
<br><br>4) Use a condional dialplan. e.g GotoIfTime or other uses of GotoIf .</blockquote><div><br>Now, add a flag that allows your calls to be routed as either:<br>1. Default - route according to the schedule<br>2. Open - give me the calls, to heck with the time
<br>3. Closed - leave me alone. Yes, I know what time it is, but I don&#39;t care.<br><br>Put this before the GotoIfTime stuff, and it can override however you&#39;d like.<br><br>We did this, but added a few fancy things, like ClosedForHurricane mode. It allows us to record a message as to which dates patients have been rescheduled to, says the time of the last update, and a few other goodies.
<br><br>Have fun with it. You can do just about anything you can dream of. Except solve the halting problem. Ah well...<br></div><br></div><br>