[Asterisk-Users] DND on SIP
Paul Crick
web-asterisk-users at ivrl.com
Thu Oct 14 07:54:50 MST 2004
Joseph wrote:
> How do you get * to forward the call to the next dialplan
> entry? I always get a busy signal when turning on the DND
> option of the 7960.
The customer in question didn't like the hassle of
Settings->6->Yes->Save->Back (despite the visual confirmation of DND status
on the screen). We provisioned *78 to enable DND and *79 to cancel - I
believe they programmed these on to unused keys on the phone as speed dials.
Then in the dial plan we have a macro for calling an extension with
voicemail:
[macro-exten-vm]
; Call extension ${ARG1} for ${ARG2} seconds, divert to voicemail on busy or
noreply
exten => s,1,DBget(DNDStatus=DND/${ARG1})
exten => s,2,GotoIf(${DNDStatus}=1?103:102)
exten => s,102,Dial(SIP/${ARG1},${ARG2})
exten => s,103,Voicemail(u${ARG1})
exten => s,104,Playback(thank-you-for-calling)
exten => s,105,Playback(vm-goodbye)
exten => s,106,Hangup
exten => s,203,Voicemail(b${ARG1})
exten => s,204,Playback(thank-you-for-calling)
exten => s,205,Playback(vm-goodbye)
exten => s,206,Hangup
The DBget jumps to 102 if the key isn't found (ie DND is not set for the
destination extension). Priority 2 is kind of superfluous - if the key DOES
exist, we'll just jump to 103 (the key should never be created with a value
that isn't 1, so we'll never jump to 102).
The other difference with doing it this way is that the user will get
"unavailable" treatment in voicemail, rather than the "busy" treatment that
you'd get using DND on the phone.
For completeness, here's the dialplan for setting and cancelling DND:
[app-dnd]
exten => *78,1,Answer
exten => *78,2,DBput(DND/${CALLERIDNUM}=1)
exten => *78,3,Wait(1)
exten => *78,4,Playback(do-not-disturb)
exten => *78,5,Playback(activated)
exten => *78,6,Hangup
exten => *79,1,Answer
exten => *79,2,DBdel(DND/${CALLERIDNUM})
exten => *79,3,Wait(1)
exten => *79,4,Playback(do-not-disturb)
exten => *79,5,Playback(de-activated)
exten => *79,6,Hangup
Cheers
Paul
More information about the asterisk-users
mailing list