Sketching in VOIP with Tropo

Tropo

At eComm Jeevan and I heard some intriguing stuff about a service called Tropo, a cloud-based scriptable VOIP system designed to let web hackers start working in the voice and telephony world.

The app provides a pretty damn slick interface to quickly set up a real phone number (plus SIP plus Skype, all in one place), then assign it to a script written in javascript, groovy, python, ruby, or probably whatever other BSF language they support.

Here’s one I wrote and deployed in about 20 minutes to read off all the Miniature Monster descriptions from the RSS feed (Tropo calls highlighted). You can test it out by calling (650) 273-5382 (or +99000936 9991428654 on Skype, though I haven’t tried that):


require 'net/http'
require 'rexml/document'

answer
wait(3000)
say "hello, welcome to professor engd's miniature monster hotline. here are your monster updates."
wait(1000)

url = "http://feedproxy.google.com/miniaturemonsters"
xml_data = Net::HTTP.get_response(URI.parse(url)).body
xml_doc = REXML::Document.new(xml_data)

xml_doc.elements.to_a( "//description" ).reverse.each do |desc|
  if (m = (/\<div id=\"description\">\s*\<em\>(.*?)\<\/em\>\<\/div\>/i).match(desc.text))
    say m[1]
    wait(1000)
  end
end

hangup

I’ve worked on some projects recently involving Asterisk-to-web-to-hardware style hacking, typically using something like Gizmo to register a regular phone number assigned to a SIP number, then setting up asterisk as the SIP softphone and messing around with a retarded dialplan syntax to get things going. Tropo seems to simplify all that… substantially.

The documentation is solid if a little thin, but it’s so new, and the app is so slick and well done, so I’m sure there’s more coming. It’s unclear at this point which Ruby libraries and gems they support, if any. And it all feels a little like a toy, but no more than, say, Google App Engine, and for me it’s actually more potentially useful. What I can say at this point is that it’s a solid way to sketch your telelphony ideas quickly and with zero setup time, which is very cool. Are you listening ITP?

Anyway, happy voip hacking.

3 Responses to “Sketching in VOIP with Tropo”

  1. Jonathan Taylor Says:

    Brent, thanks for the great overview of Tropo. It’s nice that you mention the toy feel – we wanted Tropo to *feel* like a toy while at the same time being quite powerful.

    On the subject of Ruby libs and gems, we have an open request policy. Anyone can request what they want. The items requested most often will be reviewed and added first. Fundamentally we want to support as many libraries as we can for each language.

    And yes, we do have a lot more coming, including more documentation, libraries, languages, and a significant expansion of the ways you can access Tropo applications.

    We also have a more “comfy” version of the Ruby API that uses Ruby specific features; it should be up within a week.

    Best,

    -Jonathan Taylor,
    Coding Executive Office (CEO) at Tropo / Voxeo

  2. Brian Mulloy Says:

    awesome find, brent. this is really cool. congrats, Jonathan, on launching an awesome service.

    -b

  3. visnu Says:

    ooh, I just thought of something good. giving myself 30 minutes to implement.

Leave a Reply