any chance you can try out this change. It will go into the next core module update which will be a day or two. But you can also put it in manually. I had this issue occure on another person’s system also - Asterisk 1.2.20. Works for a while and then Asterisk decides to start reporting failure even though the sound file is there… (we love asterisk!)
[code:1]
Index: extensions.conf
— extensions.conf (revision 4406)
+++ extensions.conf (working copy)
@@ -288,11 +288,14 @@
exten => vmx,n,GotoIf($["${DB(AMPUSER/${ARG1}/vmx/${MODE}/state)}" != “enabled”]?s-${ARG2},1)
; If the required voicemail file does not exist, then abort and go to normal voicemail behavior
-; TODO: figure out which is proper file (.wav or .WAV) and maybe find a better way
-; still want to find something better than ‘ls’ but for now, it checks either
;
+; TODO: there have been errors using System() with jump to 101 where asterisk works fine at the begining and
+; then starts to jump to 101 even on success. This new mode is being tried with the SYSTEM Status which
+; returns SUCCESS when the command returned succcessfully with a 0 app return code.
+;
exten => vmx,n,Macro(get-vmcontext,${ARG1})
-exten => vmx,n(file),System(ls ${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${ARG1}/${MODE}.[wW][aA][vV])
+exten => vmx,n,TrySystem(/bin/ls ${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${ARG1}/${MODE}.[wW][aA][vV])
+exten => vmx,n,GotoIf($["${SYSTEMSTATUS}" != “SUCCESS”]?nofile)
; Get the repeat, timeout and loop times to use if they are overriden form the global settings
;
@@ -377,7 +380,7 @@
; If the required voicemail file is not present, then revert to normal voicemail
; behavior treating as if it was not set
;
-exten => vmx,file+101,Noop(File for mode: ${MODE} does not exist, going to normal voicemail)
+exten => vmx,n(nofile),Noop(File for mode: ${MODE} does not exist, SYSTEMSTATUS: ${SYSTEMSTATUS}, going to normal voicemail)
exten => vmx,n,Goto(s-${ARG2},1)
; Drop into voicemail either as a direct destination (in which case VMX_OPTS might be set to something) or
[/code:1]
I’ve reopened the bug until I can get some confirmation that this now fixes things:
http://freepbx.org/trac/ticket/2046