Holy Telephony, Batman!

Posted by Hans Fugal Thu, 01 Mar 2007 14:20:13 GMT

batphone

Does the world need yet another Ruby Asterisk Gateway Interface library? Does the world need a guy who dresses up like a bat?

I was not satisfied with the complexity and learning curve of existing AGI libraries for Ruby, so rather than spend an hour learning one of them I spent several hours writing my own. I hope this pays off in the future when it only takes me 5 minutes to remember/relearn how to use batphone. It was fun, anyway. That's the point, isn't it? That's why Batman does it. Not for the citizens of Gotham, but because it's fun.

Here's a synopsis:

#!/usr/bin/ruby
require 'agi'

agi = AGI.new
agi.answer
agi.stream_file('batman_help_the_monkeys_are_everywhere', nil)
begin
  # press pound to make them stop!
  r = agi.stream_file('tt-monkeys', '#')
end while r.result != ?#
agi.stream_file('POW', nil)
agi.hangup

Here's the URLs: For Documentation press 1. For Download press 2. For direct access to the batphone press 3.

POW!

Comments

  1. Gabriel Gunderson said about 2 hours later:

    Hey, I did the same in C# under Mono. I too did it "for the fun of doing it."

    When I pick up Ruby, your code will be one of the first thing I play with :)

(leave url/email »)

   Comment Markup Help Preview comment

Tags

asterisk audio bash bread cs diy fat food health life linux mac music osx review ruby sourdough src typo voip