Twilio – Telephony in the Cloud
Twilio founder Jeff Lawson stopped by Amazon headquarters yesterday for a show and tell session. Twilio provides a simple yet powerful way to build highly scalable telephony applications. Of course, Twilio itself runs on Amazon EC2 and stores data in Amazon S3.
A Twilio application is simply a phone-activated web application. When the application’s phone is called, Twilio answers and activates the application. The application then returns an XML document containing TwiML (Twilio Markup) commands. Jeff showed up how Twilio’s 5 commands (<Play>, <Gather>, <Record>, <Say>, and <Dial>) can be combined to create applications in minutes.Here’s what they do:
<Play> is used to play an audio file for the caller. Twilio will transcode the file in real-time, turning high-quality audio into the required 8 bit 11 kHz format.
<Gather> accepts one or more digits from the caller’s keypad and passes them to a specified URL using POST or GET.
<Record> captures the caller’s voice and returns a URL which points to the recorded audio. Recording can be terminated using a specificed keypad key or after a specified quiet period.
<Say> invokes a text to speech engine with male and female voices in 4 languages.
<Dial> is used to connect the caller to another phone number.
Pricing is friendly for developers! Developer accounts are free and include 1000 minutes of calls. Full accounts cost $5 per phone number (local or toll free), then 3 (local) or 5 (toll free) cents per minute for incoming calls and 3 cents per minute for outgoing calls.
Jeff showed us an application that he’d built the day before. The application allows the caller to request the status of EC2, S3, or SQS. The application then parse’s the AWS status dashboard’s HTML and echoes the status of the requested service. You can read all about the application or you can try it out by calling 206-866-5918.
You can get started here (you’ll need to ask for an invite code there first).
Update: Jeff just emailed me a link to a Slideshare presentation with even more info about Twilio. The presentation includes some really interesting information about how they use EC2, S3, and SQS to build Twilio, and how they build and customize their EC2 instances. He also let me know that they have plenty of invite codes available for readers of this blog.