Email send when extension or custom application dialed

Try this:

same => n,System(echo -e 'Body Callback from:\\n ${CALLERID(num)} (${CALLERID(name)}) \\n on ${STRFTIME(${EPOCH},,%d.%m.%Y at %H:%M:%S)}' | mail -s "Subject Callback ${CALLERID(num)} - PBX" -r from@mail.com to@mail.com)

Most of the time the from@mail.com is important so you e-mail-server will not reject that email on the way out.
Use as you did in the Vitalpbx email Settings.

And do what PitzKey said to keep on going with the destination you put in at the Custom Context module.

This might help you as well:
https://www.vitalpbx.org/blog/customizing-vitalpbxs-dial-plan/
and this
https://github.com/VitalPBX/custom-contexts/blob/master/extensions__90-custom.conf

Always try from small to big. Step by step to better find the problem.

1 Like