A few times recently I’ve wanted to be able to turn an e-mail into a voice call. This would be especially handy for emergency server monitoring and notification.
Here is my first attempt. It’s also my first attempt at writing something in Python so you definitely use at your own risk!
There is room for improvement as there is no validation on any of the fields extracted from the e-mail.
It also assumes that these components are already in place –
- Asterisk (with Astersk Manager Interface)
- E-mail server (I’m using Postfix)
- Ceptral text-to-speech (www.cepstral.com) – installed in /opt/swift/bin
- Python (I’m using v2.4.3)
EDIT – these test numbers are no longer functional
As a quick demonstration of what you can achieve with Trixbox in a couple of hours I have put together a demonstration phone system.
Trixbox uses Asterisk and FreePBX to provide a richly featured phone system that you can do lots of interesting things with.
For the demonstration I created a phone system with DDI numbers in the London and New York. These phone numbers are provided by future-nine.com.
If you would like do give it a go you can call the system using the following regular telephone numbers –
- UK xxxxxxxxxxxx
- US xxxxxxxxxxxx
The system comprises an automated voice menu with the following options –
- Press 1 – for some music.
- Press 2 – for a speaking clock that reads the time in the UK.
- Press 3 – for an echo test. This will echo back everything you say to it, giving you an idea of the delay on the line.
- Press 4 – to leave a voicemail. This will then be e-mailed to me as an e-mail attachment.
- Press 5 – for some current news. This is produced by downloading the latest rss news feed from Yahoo and then converting it to speech using software from Cepstral. It’s certainly not perfect but gives an idea of what is possible. The audio is updated automatically every hour. The main IVR menu speech was also created using Cepstral.
The whole process from ordering the phone numbers from future-nine, to having a functioning phone system, took only a couple of hours and the only part that is not possible to perform via the web gui was downloading and converting the news feed.
As FreePBX forms the basis of most of the Asterisk distributions is just as easy to do the same with Trixbox, Elastix or PBX in a Flash.
Please give it a go and add a comment below to let me know how you get on.
If you’d like more information about virtual PBXs from Sysadminman then click here