VOICEMAIL : I've tried a lot but mailing is not working

I have an ssh-session to my remote Asterisk-box, yes.
To test my changes, I call from my Zoiper-softphone, which has an account in iax.conf.

What do you mean with an ‘iax-user’ and a ‘local user’ ?

Now I have this again : -- Executing [3000@TCS-personeel-zoiper:1] NoOp("IAX2/78.22.173.198:4569-14394", "test mailscript") in new stack -- Executing [3000@TCS-personeel-zoiper:2] System("IAX2/78.22.173.198:4569-14394", "/bin/sh /var/lib/asterisk/agi-bin/mail2.sh test-email /etc/asterisk/iax.conf") in new stack -- Executing [3000@TCS-personeel-zoiper:3] NoOp("IAX2/78.22.173.198:4569-14394", "systemstatus : APPERROR") in new stackAgain the APPERROR.

-- Executing [3000@TCS-personeel-zoiper:1] NoOp("IAX2/78.22.173.198:4569-4235", "test mailscript") in new stack -- Executing [3000@TCS-personeel-zoiper:2] AGI("IAX2/78.22.173.198:4569-4235", "mail2.sh test-email /etc/asterisk/iax.conf") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/mail2.sh test-email /etc/asterisk/iax.conf == mail2.sh test-email /etc/asterisk/iax.conf: Failed to execute '/var/lib/asterisk/agi-bin/mail2.sh test-email /etc/asterisk/iax.conf': No such file or directory
I am not yet familiar with the AGI()-command…

  1. “Normally”, Asterisk would not need the /etc/asterisk/iax.conf to run a shell command.
  2. AGI (and DeadAGI) are just different shell executions in Asterisk that let you run other things like Perl, PHP and C in addition to the BASH that you are trying to do.

If indeed AGI can also execute a bash-script or shell-script, then I don’t understand why it states that there is no file or directory.

It’s an endless loop of failures !

Check this out and see if it sheds any light on your problem
lists.digium.com/pipermail/aster … 08554.html

msmtp.conf permissions must be 600