Dialplan, Voicemail, System cmd and exited non-zero?

Hi,

I do have dialplan which should execute a script after the voicemail is recorded to the asterisk system. The problem is that when caller hangs up, the System command isn’t executed but CLI informs “exited non-zero” and the dialplan is exited. On the other hand if I press “#” pound key after I have given my voicemail, everything seems to work fluently. How could I prevent this “exited non-zero” problem ?

Thanks a lot,
-Mika

  • extensions.conf -
    [mycontext]
    exten => myaccount, 1, Macro(myvmtest,myaccount)

[macro-myvmtest]
exten => s,1,Wait(1)
exten => s,2,Voicemail(${ARG1})
exten => s,3, System(/usr/bin/logger Test)
exten => s,4,Hangup

  • CLI message -
    *CLI>
    – Executing Macro(“SIP/sip.me.com-09c255a0”, “myvmtest|myaccount”) in new stack
    – Executing Wait(“SIP/sip.me.com-09c255a0”, “1”) in new stack
    – Executing VoiceMail(“SIP/sip.me.com-09c255a0”, “myaccount”) in new stack
    – Playing ‘vm-intro’ (language ‘en’)
    – Playing ‘beep’ (language ‘en’)
    – Recording the message
    – x=0, open writing: /var/spool/asterisk/voicemail/default/myaccount/INBOX/msg0028 format: wav49, 0x9c2ac48
    – x=1, open writing: /var/spool/asterisk/voicemail/default/myaccount/INBOX/msg0028 format: gsm, 0x9c2af88
    – x=2, open writing: /var/spool/asterisk/voicemail/default/myaccount/INBOX/msg0028 format: wav, 0x9c2b240
    – User hung up
    == Spawn extension (macro-myvmtest, s, 2) exited non-zero on ‘SIP/sip.me.com-09c255a0’ in macro ‘myvmtest’
    == Spawn extension (mycontext, myaccount, 1) exited non-zero on ‘SIP/sip.me.com-09c255a0’