[asterisk-users] Direct to Voicemail
Doug Lytle
support at drdos.info
Wed Aug 23 05:39:21 MST 2006
Hey everybody,
I've set up an extension that allows users to send a call directly to
voice mail. Yesterday, someone accidentally sent a call to an extension
that didn't exist and the call was dropped. I found the option to check
if a mailbox exists and it works fine, but I get the following 'warning':
Spawn extension (sip, 04258, 0) exited non-zero on 'Zap/3-1'
-- Executing Set("Zap/3-1", "_direct_vm=4258") in new stack
-- Executing MailboxExists("Zap/3-1", "4258 at sip|") in new stack
Aug 23 08:26:30 WARNING[8313]: app_voicemail.c:5697 vm_box_exists: VM
box 4258 at sip exists, but extension 04258, priority 103 doesn't exist
Is there a way to avoid this warming? Code fragment below:
[direct-to-voicemail]
; **************************************************
; Allow anybody to send a call directly to voicemail
; by pre-pending a 0 to the destination extension.
; Checks to see if voice mail box exists, if not
; Tells the callee that no such vm box exists and
; then transfers them to the operator
; **************************************************
exten => _04XXX,1,Set(_direct_vm=${EXTEN:1})
exten => _04XXX,2,MailboxExists(${direct_vm}@sip)
exten => _04XXX,3,Goto(s-${VMBOXEXISTSSTATUS},1)
exten => s-FAILED,1,SayDigits(${direct_vm})
exten => s-FAILED,2,Playback(vm-nobox)
exten => s-FAILED,3,Playback(pbx-transfer)
exten => s-FAILED,4,Goto(incoming,s,1)
exten => s-SUCCESS,1,Set(CALLBACK=${DB(vmcallback/${direct_vm})})
exten => s-SUCCESS,2,GotoIf($["${CALLBACK}" =
"YES"]?s-SUCCESS,3:s-SUCCESS,4)
exten => s-SUCCESS,3,System(/usr/local/bin/vm-callout.sh ${direct_vm})
exten => s-SUCCESS,4,Voicemail(u${direct_vm}@sip)
exten => s-SUCCESS,5,Hangup()
--
Ben Franklin quote:
"Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."
More information about the asterisk-users
mailing list