A Python script that triggers a call from an e-mail message.
These instructions assume you are using postfix on a debian based system. Please adapt to your own system appropriately.
To use the following system, send an email to callback@FQDN, with either the subject of "callback NUMERIC" or somewhere in the body with "callback NUMERIC". This will then dial the number NUMERIC based on the dialplan of the email2callback user, for example "callback 1800123123".
1. Install postfix, sudo, python, and have postfix accept mail to local unix users.
2. Make sure 'freepy' (found in the scripts/socket directory) is setup correctly, which may mean installation of the SMC python library as per the README/INSTALL of freepy.
3. Create an extension, with username of email2callback, and choose an appropriate password for the user. Please set the password within the python script below.
4. Add the following to /etc/sudoers, which will allow the nobody user (which postfix uses for spawning scripts from /etc/aliases) to execute the script owned by freeswitch:
5. Add the following to /etc/aliases, and then run newaliases:
6. Create the file /usr/local/bin/email2callback.sh:
7. Create the file /opt/freeswitch/scripts/socket/email2callback.py: