Launch script from email


Can anyone suggest how to launch an agi-bin script from an email received in Asterisk?


Asterisk cannot receive emails.

Your program handler for emails could:

  • create a call file;

  • use asterisk -rx ‘originate…’; or

  • use the AMI protocol to invoke an Originate action.

I once implemented it.
Here’s the procedure: … g-via.html
In my setup, Postfix launchs a shell script when an email is received.
(the script adds an Iax user, an entry in the dialplan and it reloads the Iax stack)
Feel free to customize it for your needs.