Asterisk CMD Voicemail fails to return on hangup

According to http://www.voip-info.org/tiki-index.php?page=Asterisk+cmd+VoiceMail, voicemail will return the following results SUCCESS | USEREXIT | FAILED.

but it does not if user hangs up after leaving voicemail.

MOST PEOPLE IN THE WORLD HANG UP. so asking them to press # will not do.

I get:

[Dec 11 12:32:42] VERBOSE[30770] logger.c: – User hung up
[Dec 11 12:32:42] VERBOSE[30770] logger.c: == Spawn extension (leave_voicemail, s, 1) exited non-zero on ‘SIP/102-093c1e18’

this sounds like a bug to me.

Hi

have you added a Noop to check what is returned ? the exit result is returned in the VMSTATUS channel variable. add a Noop in the H extension to see what it is.

Ian

thanks, that did the job.

was not using extension h

[leave_voicemail]
exten => s,1,Voicemail(500|s)
exten => s,n(next),system(${SCRIPTS_DIR}/voicemail_callback.sh 500)
exten => s,n,Hangup
exten => h,1,Verbose(${VMSTATUS})
exten => h,n,GotoIf($["${VMSTATUS}" = “SUCCESS”]?s,next)