[asterisk-users] Adding DND to dialplan
Brian McEntire
brian.mcentire at gmail.com
Tue Apr 3 12:15:43 MST 2007
Ahh... got it now. Thanks for all the replies.
I was thinking that it was a function that was already built in, but
I see by setting a value and then testing it before ringing
extensions, it's easily added to the dialplan.
On 4/3/07, Philipp Kempgen <philipp.kempgen at amooma.de> wrote:
> Bruce Reeves wrote:
>
> > exten => *73,1,Answer()
> > exten => *73,n,Wait(0.5)
> > exten => *73,n,Set(DB(${CALLERID(number)}/DND)=1)
>
> Would prefer Set(DB(${DND/CALLERID(num)})=1)
>
> > exten => *73,n,Playback(do-not-disturb)
> > exten => *73,n,Playback(enabled)
> > exten => *73,n,Hangup()
> >
> > and then
> >
> > When someone calls say extension 1000 I would have a macro check for :
> >
> > exten => s,n,Set(DNDStatus=$["${DB(1000/DND)}" = "1"]) <= returns a 1 if
> > enabled or a 0
> > exten => s,n,GoToIf($[${DNDStatus} = 1]?DND)
> > exten => s,n(DND),Voicemail(1000 at default,u)
>
> More complete:
>
> [macro-check-dnd]
> exten => s,n,Answer()
> exten => s,n,Wait(1)
> exten => s,n,Set(DNDStatus=$["${DB(DND/${ARG1})}" = "1"])
> exten => s,n,GotoIf($[${DNDStatus} = 1]?DND)
> exten => s,n,Dial(SIP/${ARG1})
> exten => s,n,Hangup()
> exten => s,n(DND),Voicemail(${ARG1}@default,u)
> exten => s,n,Hangup()
>
> [default]
> exten => _XXXX,1,Macro(check-dnd,${EXTEN})
>
>
> Regards,
> Philipp
>
> --
> amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
> Let's use IT to solve problems and not to create new ones.
> Asterisk? -> http://www.das-asterisk-buch.de
>
> Geschäftsführer: Stefan Wintermeyer
> Handelsregister: Neuwied B 14998
> _______________________________________________
> --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
>
More information about the asterisk-users
mailing list