This evening I tried out some of the Phone/Voice/SMS features available from the site Tropo.com, and I'm definitely interested in going "Back to the Future" and composing a "User Interface" based on an Interactive Voice Response and the Plain Old Telephone Service. The APIs at Tropo.com give you two options of building your app:
- You can compose a script or JSON file that they'll "host" on their server. This means that any/all incoming requests are processed using these rules, which means that your "app" can't do anything dynamic.
- You provide the URL for your own web server that communicates via JSON (using your favorite server-side programming language) and it returns dynamic responses for the current conversation. This is my "preferred" route - the only catch is that it requires a dedicated and "constantly connected" Internet web server that can be reached by the Tropo.com servers.
I had the opportunity to see this kind of technology in action earlier this month at a MinneBar session, presented by Kevin Whinnery at twilio.com, where he made it look super easy to hook up code with the phone system. Since I finally had a few hours of "free time", I had to try it out for myself.
The most difficult part was finding a way to host it with an "always on" Internet connection. My initial thought was a Node.js PaaS provider (Joyent, Heroku, etc), but all of the companies that I could find only offered "limited duration" samples that would eventually expire after a few months, or the servers would go to sleep after a period of inactivity, which causes latency (I hate waiting for computers).
The "safest" box I have to throw at the Internet is a Raspberry Pi. The next catch is that Node.js doesn't provide an ARM based binary - you have to manually compile it. This brought back memories of the Linux servers I used in the late 90's, which required me to custom compile the kernel to support the SCSI controllers that I used. Anyway, there's no shortage of helpful blog posts that provide the simple steps needed to get Node.js running on the RasPi. Helpful note: you have plenty of time to go watch a movie while the compile/build runs.
For now, I just have the app report the current time, but I have some thoughts on providing "useful information" similar to the old Moviefone service (yeah, before cell phones were ubiquitous). We'll see if I can string together enough "free nights" to make that happen!