Hi all, As we know we can configure in astersik like before 5:00pm calls go to reception and after 5:00 pm calls go to some mobile no. One of my client requested that he wants to manually shift the dial plan like above as he has flexiable timing sometime he finishes at 3:00pm some time 8pm. I can not give him freepbx access. Any idea or solution. Regards Farooq --
Hi all, As we know we can configure in astersik like before 5:00pm calls go to reception and after 5:00 pm calls go to some mobile no. One of my client requested that he wants to manually shift the dial plan like above as he has flexiable timing sometime he finishes at 3:00pm some time 8pm. I can not give him freepbx access. Any idea or solution. Regards Farooq
On 7/3/07, Farooq Ahmed <fahmed at tpg.com.au> wrote:> Hi all, > As we know we can configure in astersik like before 5:00pm calls go toreception and after 5:00> pm calls go to some mobile no. One of my client requested that he wants tomanually shift the dial> plan like above as he has flexiable timing sometime he finishes at 3:00pmsome time 8pm. I can> not give him freepbx access. > Any idea or solution. > Regards > Farooq > --Set up a speeddial button on the phone. This extension will simply write a value to the asterisk db. I have some other modifications done, but here is me actual extension: ; Night Mode Activations exten => 799,hint,DS/mmgc exten => 799,1,Macro(open-close,mmgc,custom/moore-moore-now-open,custom/moore-moore-now-closed) exten => 799,n,Playback(beep) exten => 799,n,Hangup [macro-open-close] exten => s,1,DBGet(nightmode=nightmode/${ARG1}) exten => s,n,NoOp(ARG1 ${ARG1} ARG2 ${ARG2} ARG3 ${ARG3}) exten => s,n,Set(OpenFile=${ARG2}) exten => s,n,Set(CloseFile=${ARG3}) exten => s,n,NoOp(Close file ${CloseFile}. Open file ${OpenFile}.) exten => s,n,GotoIf(${nightmode}=1?s,Open:s,Close) exten => s,n(Open),DBPut(nightmode/${ARG1}=0) exten => s,n,Devstate(${ARG1},0) exten => s,n,Playback(${OpenFile}) exten => s,n,Goto(Return) exten => s,n(Close),DBPut(nightmode/${ARG1}=1) exten => s,n,Devstate(${ARG1},2) exten => s,n,Playback(${CloseFile}) exten => s,n(Return),NoOp 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. 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). This should at least get you started. 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. -- Lacy Moore Somewhere I wish I wasn't -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070703/6b2a11d3/attachment.htm
Hi Farooq, I've done just that for one of our customers. All I did was add an exten such as *56 that set a custom database value to nightmode=true. Then as calls come in I just check the database value to see if it is set to true or not. Note I have asterisk patched with Bristuff so unless you do as well the hint section will not work. See Below exten => *56,hint,DS/56 exten => *56,1,Set(NightMode=${DB(nightmode/active)}) exten => *56,n,playback(service) exten => *56,n,Gotoif($["${NightMode}" = "true"]?turnoff) exten => *56,n,Set(DB(nightmode/active)=true) exten => *56,n,devstate(56,2) exten => *56,n,playback(activated) exten => *56,n,hangup() exten => *56,n(turnoff),Set(DB(nightmode/active)=false) exten => *56,n,playback(de-activated) exten => *56,n,devstate(56,0) exten => *56,n,hangup Then as a call comes in you just check the value in the database exten => q,1,Set(NightMode=${DB(nightmode/active)}) exten => q,n,Gotoif($["${NightMode}" = "true"]?afterhoursq,q,1) exten => q,n,GotoIfTime(8:00-17:30|mon-fri|*|*|?businesshours) Nathan Dennis __________________________________________________________ -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Farooq Ahmed Sent: Tuesday, 3 July 2007 5:00 PM To: asterisk-bsd at lists.digium.com; asterisk-users at lists.digium.com Subject: [asterisk-users] Need Advice/Suggestion Hi all, As we know we can configure in astersik like before 5:00pm calls go to reception and after 5:00 pm calls go to some mobile no. One of my client requested that he wants to manually shift the dial plan like above as he has flexiable timing sometime he finishes at 3:00pm some time 8pm. I can not give him freepbx access. Any idea or solution. Regards Farooq -- _______________________________________________ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
You can use asterisk db functions to set an afterhours flag, and then use the dialplan to check if the flag is set or not. One of the techs in our office does stuff like that all the time for clients. PaulH On Tue, 2007-07-03 at 17:00 +1000, Farooq Ahmed wrote:> Hi all, > As we know we can configure in astersik like before 5:00pm calls go to reception and after 5:00 > pm calls go to some mobile no. One of my client requested that he wants to manually shift the dial > plan like above as he has flexiable timing sometime he finishes at 3:00pm some time 8pm. I can > not give him freepbx access. > Any idea or solution. > Regards > Farooq
> One of my client requested that he wants to > manually shift the dial > plan like above as he has flexiable timing sometime he finishes at 3:00pm some > time 8pm. I can > not give him freepbx access.How about ignoring the time element completely and just telling the client to divert his/her phone before they leave the office? Depending on the device, they can either do that locally on the device, or alternatively, you can program a couple of short codes into your dialplan to allow the client to enable/disable divert. Regards, Chris -- C.M. Bagnall, Director, Minotaur I.T. Limited For full contact details visit http://www.minotaur.it/chris.html This email is made from 100% recycled electrons
Or, if you can have a trigger of some type. If you have say, a database, that stores the current "night service" status, then you can query that to determine if you should send the call to the after hours steps, or to dial into the phone. Then set up another extension that the internal people can dial to trigger that service. Rob Chris Bagnall wrote:>> One of my client requested that he wants to >> manually shift the dial >> plan like above as he has flexiable timing sometime he finishes at 3:00pm some >> time 8pm. I can >> not give him freepbx access. >> > > How about ignoring the time element completely and just telling the client to divert his/her phone before they leave the office? Depending on the device, they can either do that locally on the device, or alternatively, you can program a couple of short codes into your dialplan to allow the client to enable/disable divert. > > Regards, > > Chris >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070709/b129c1be/attachment.htm