<div>On 7/3/07, Farooq Ahmed <<a href="mailto:fahmed@tpg.com.au">fahmed@tpg.com.au</a>> wrote:<br>> Hi all,<br>> As we know we can configure in astersik like before 5:00pm calls go to reception and after 5:00<br>
> pm calls go to some mobile no. One of my client requested that he wants to manually shift the dial<br>> plan like above as he has flexiable timing sometime he finishes at 3:00pm some time 8pm. I can<br>> not give him freepbx access.
<br>> Any idea or solution.<br>> Regards<br>> Farooq<br>> --<br><br>Set up a speeddial button on the phone. This extension will simply write a value to the asterisk db.<br><br>I have some other modifications done, but here is me actual extension:
<br><br>; Night Mode Activations<br>exten => 799,hint,DS/mmgc<br>exten => 799,1,Macro(open-close,mmgc,custom/moore-moore-now-open,custom/moore-moore-now-closed)<br>exten => 799,n,Playback(beep)<br>exten => 799,n,Hangup
<br><br>[macro-open-close]<br>exten => s,1,DBGet(nightmode=nightmode/${ARG1})<br>exten => s,n,NoOp(ARG1 ${ARG1} ARG2 ${ARG2} ARG3 ${ARG3})<br>exten => s,n,Set(OpenFile=${ARG2})<br>exten => s,n,Set(CloseFile=${ARG3})
<br>exten => s,n,NoOp(Close file ${CloseFile}. Open file ${OpenFile}.)<br>exten => s,n,GotoIf(${nightmode}=1?s,Open:s,Close)<br>exten => s,n(Open),DBPut(nightmode/${ARG1}=0)<br>exten => s,n,Devstate(${ARG1},0)
<br>exten => s,n,Playback(${OpenFile})<br>exten => s,n,Goto(Return)<br>exten => s,n(Close),DBPut(nightmode/${ARG1}=1)<br>exten => s,n,Devstate(${ARG1},2)<br>exten => s,n,Playback(${CloseFile})<br>exten => s,n(Return),NoOp
<br> </div>
<div>It's a little ugly, but it works. Basically, the basics of it is that it inserts a 1 into the nightmode database when it is closed. Your IVR script needs to check this database entry, if it is 1, it goes to the closed script, if it is 0 it goes to open.
</div>
<div> </div>
<div>The DS refers to DeviceState. I have this patch on my system. Using this, it will turn the light on when on night mode and turn it off when open. I may end up switching entirely to this instead of time based, or rather having our system set up so that our receptionist has to tell the system when she gets to work (if she happens to come in that day, be careful hiring family members).
</div>
<div>This should at least get you started. </div>
<div> </div>
<div>One other thought, you could even set this up to open and close remotely. You would dial in to the system, then enter the extension number. In that case, you might want to make use of some type of authentication. Off the top of my head, I can't remember the app that does this, but it is simple to setup. It would require you to dial your system, enter the extension, then enter a code. By doing this, you can make sure that only you can open and close the system.
</div>
<div> </div>
<div><br><br><br><br><br>-- <br>Lacy Moore<br>Somewhere I wish I wasn't<br> </div>