[asterisk-users] Direct to Voicemail

Aaron Daniel amdtech at shsu.edu
Wed Aug 23 07:26:52 MST 2006


Since you're using the variables to decide what to do next
(VMBOXEXISTSSTATUS), you can go ahead and set priorityjumping=no in the
general section of extensions.conf, unless you're using the n+101
priority jumping elsewhere.

On Wed, 2006-08-23 at 08:39 -0400, Doug Lytle wrote:
> 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()
> 
> 
-- 
Aaron Daniel
Computer Systems Technician
Sam Houston State University
amdtech at shsu.edu
(936) 294-4198




More information about the asterisk-users mailing list