File: README

Description

Batphone

Batphone is an Asterisk Gateway Interface (AGI) library for Ruby. It is well-suited to simple bat-tasks, with a small learning curve. (I promise you‘ll spend more time figuring out AGI than batphone). It is also perfectly capable of making all your wildest AGI dreams come true. It won‘t get in your way.

  1. www.voip-info.org/wiki-Asterisk+AGI

Synopsis

In extensions.conf:

    exten => batphone,1,AGI(batphone.agi)

batphone.agi:

    #!/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

Requirements

Gee, Batman, all you need is Ruby. You might want Asterisk too.

Installation

Get it from GitHub and put it somewhere batty.

    sudo rake install

or

    sudo ruby setup.rb

Details

An AGI object serves as your proxy to Asterisk. Each time you send a command to Asterisk using AGI#send or using the metaprogrammed interface, you get an AGI::Response back.

TODO

License

Copyright:Copyright (C) 2007 Hans Fugal <hans@fugal.net>.
License:Distributed under the same terms as Ruby.

Colophon

Holy red phones, Batman! Asterisk is about phones. Rubies are red. Batphones are really swell red phones.

No relation to batsman, though I think he‘s swell too.

The image is from an article on building your own physical batphone at Millionaire Playboy.