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:
Documentation: File: README
Download: http://hans.fugal.net/src/batphone/batphone-0.1.0.tar.gz
POW!