[asterisk-users] Adding DND to dialplan
Philipp Kempgen
philipp.kempgen at amooma.de
Tue Apr 3 08:26:52 MST 2007
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
More information about the asterisk-users
mailing list