Norbert Zawodsky
2006-Nov-12 06:47 UTC
[asterisk-users] dynamically modifying the dialplan?
Hi Brian, many thanks to you for your answers in the past! The always gave me the little bit of mising information... My Asterisk box is running fine now so I want to try the "next step"... And now to all of you .... What I want to implement is to use 1 button of my snom-360 phone for following purpose: If I leave my desk I press this button. A light should show up as an indicator/reminder. From this moment all calls to my extension should immediately be transferred to my voicemail box. When I return I press the button again, the light goes off and all calls to my extension should ring my phone again. Now, can I achieve this with a static dialplan in extensions.conf or do I have to use all that Realtime + DB magic? Many thanks, Norbert
I think its same as DND (do not disturb ) . It can be activated by *78 and deactivated by *79 . I use freepbx for configuration so i am not sure if its there in default asterisk setup . I snipped some part of my configuration from freepbx's config files [app-dnd-on] exten => *78,1,Answer exten => *78,n,Wait(1) exten => *78,n,Macro(user-callerid,) exten => *78,n,Set(DB(DND/${CALLERID(number)})=YES) exten => *78,n,Playback(do-not-disturb&activated) exten => *78,n,Macro(hangupcall,) [app-dnd-off] exten => *79,1,Answer exten => *79,n,Wait(1) exten => *79,n,Macro(user-callerid,) exten => *79,n,dbDel(DND/${CALLERID(number)}) exten => *79,n,Playback(do-not-disturb&de-activated) exten => *79,n,Macro(hangupcall,) On 12/11/06, Norbert Zawodsky <norbert@zawodsky.at> wrote:> > Hi Brian, > > many thanks to you for your answers in the past! The always gave me the > little bit of mising information... > My Asterisk box is running fine now so I want to try the "next step"... > > And now to all of you .... > > What I want to implement is to use 1 button of my snom-360 phone for > following purpose: > > If I leave my desk I press this button. A light should show up as an > indicator/reminder. From this moment all calls to my extension should > immediately be transferred to my voicemail box. > > When I return I press the button again, the light goes off and all calls > to my extension should ring my phone again. > > Now, can I achieve this with a static dialplan in extensions.conf or do > I have to use all that Realtime + DB magic? > > Many thanks, > Norbert > > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061112/d61a49bc/attachment.htm
Benny Amorsen
2006-Nov-12 09:03 UTC
[asterisk-users] Re: dynamically modifying the dialplan?
>>>>> "NZ" == Norbert Zawodsky <norbert@zawodsky.at> writes:NZ> If I leave my desk I press this button. A light should show up as NZ> an indicator/reminder. From this moment all calls to my extension NZ> should immediately be transferred to my voicemail box. NZ> When I return I press the button again, the light goes off and all NZ> calls to my extension should ring my phone again. Apart from the light it's very easy to achieve. 12345,1,Set(DB(desk/away)=${IF($["${DB(desk/away)}"="away"]?back:away)} 12345,n,Hangup (Did I ever mention that I hate dialplan syntax? There's probably a dozen bracket or quotation errors in the above, and it took 10 minutes to write just that one line.) Check in the dial plan when you try to dial the phone whether DB(desk/away) is away or back, and go to voicemail. Then set your phone up to dial 12345 when that particular button is pressed. An alternative is to make an extension which goes to voice mail directly, and simply redirect the phone to that extension. It's a bit more than one button, but at least the Snom 360 will show that the redirection is active. Perhaps the magical function buttons can even be programmed to do it. /Benny