< Home
The Getaway
I’ve worked with voice and SMS for a while but all the applications end up being quite corporate, based around appointment reminders and so on, it was time to have some fun with the technology at my disposal. The basic concept of this application was to have a service which you could text into and it would ring you back. It seemed this would be a bit of a laugh, and useful to people who need an excuse to get out of an awkward spot.
The content of the text message takes the form GETAWAY [NUMBER] [TYPE], and dictates when the call will be made, and the type of message it will ring you with. For example, text the words ‘GETAWAY 5 PARENTS’ to the service. In 5 minutes time the phone that sent the text will ring and it will play a recorded audio file of an angry parent insisting their child come home immediately.
INBOUND SMS
The first part to tackle was to set up a trigger for when a text message was received. I have a Siemens TC35[1] plugged into the serial socket of a server. The TC35 is a GSM Modem, which is basically a mobile phone that the computer can control. It can take a normal pay-as-you-go sim card, so I set this up for development purposes.
A piece of software on the server is listening to the serial port. When a text message is received, the software records the senders number and the message contents and forwards them to the outbound script.
OUTBOUND CALL
The outbound calls are made using a service offered by 2pm Technologies[2]. They have a web api which allows you to schedule the sending of Voice XML applications to specific phone numbers. The outbound side of the getaway application involves several pre-built Voice XML applications that represent the call types, together with some dialling rules to prevent the system being tricked into making any costly or embarassing calls.
When the outbound script is triggered by an inbound SMS, it breaks up the text message to work out which Voice XML application needs to be sent and when. The script then validates this request, using the dialling rules, and schedules this application using the 2pm web api. The api also has a reporting mechanism, so it is possible to set it up to send notification that the call was made, or not (in the case that the recipient has lost coverage, flat battery, line busy, and so on).
ARE WE HAVING FUN YET?
This was a more of a proof of concept, rather than a serious application. While this mechanism works, there is a lot more that could be done with it. As a commercial project, it would make sense to rent an SMS shortcode instead of the TC35 hardware. This would make the service easier to use. ‘text GETAWAY to 12345′ is more memorable than ‘text GETAWAY to 07712345123′.
Acknowledgements, references and notes:
[1] Siemens TC35 GSM Modem
http://www.mobiledata.com.au/SiemensTC35.html
[2] 2pm Technologies Ltd
