On 9/28/07, <b class="gmail_sendername">Tzafrir Cohen</b> <<a href="mailto:tzafrir.cohen@xorcom.com">tzafrir.cohen@xorcom.com</a>> 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>> Hi folks,<br>><br>> I've been playing around with an Asterisk server in my office for a few<br>> weeks now, and I've got it pretty much nailed down the way I want it, which
<br>> is nice.<br>><br>> One of the features I'm using is the ability to switch different contexts in<br>> & out of the dialplan on a schedule. So, for example, I've got the<br>> "official" tel number ringing my desk phone between
9.00-17.30 mon-fri; and<br>> out of those hours any caller gets a recorded message + sent to voicemail.<br>><br>> However, I'm quite often working later than 17.30, and would quite like to<br>> be able to easily "flick a switch" which tells Asterisk that, actually, I'm
<br>> here in the office, and I'd quite like to receive calls. Currently, I have<br>> to alter dialplans.conf, comment out a couple of lines & uncomment another;<br>> save & then re-load the dialplan.
<br>><br>> I'm guessing I've got 3 options open to me:<br>><br>> 1) Convert from using the various .conf files, to using a "realtime" config,<br>> then write a small front-end to the DB so I can access the settings from a
<br>> simple switch on my Windows desktop<br>> 2) Write some kind of script which I can execute on the Asterisk box which<br>> makes the same changes I'm currently making manually<br>> 3) Some other option I'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't care.<br><br>Put this before the GotoIfTime stuff, and it can override however you'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>