github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

fugalh / batphone

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 5
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (3)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • fastagi
    • master ✓
  • Tags (3)
    • 0.2.0
    • 0.1.2
    • 0.1.0
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Holy Asterisk Gateway Interface (AGI) library for Ruby, Batman! — Read more

  cancel

http://hans.fugal.net/src/batphone

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

github doesn't want to do unsafe operations. pity 
fugalh (author)
Fri Mar 27 12:00:35 -0700 2009
commit  bdce06e3616e6be615f9ff319962ed4ea47bf9cf
tree    04562f65d41ac37b4d8dd12f2109f1e3617319b4
parent  7a81e682a76920eea3d4295f3672712fd2c24fac
batphone /
name age
history
message
file ChangeLog Loading commit data...
file NEWS
file README
file Rakefile
file batphone.gemspec
directory lib/
file setup.rb
directory theme/
README
= Batphone

link:../theme/batphone.png

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. http://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[http://asterisk.org]
too.

== Installation
Get it from GitHub[http://github.com/fugalh/batphone] 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
- 5xx errors span multiple lines and should be handled by the lib (probably an
  exception raised too)
- It might be nice to have convenience methods that match up with regular
  Asterisk Applications (commands), e.g. Playback, Background, etc. 
- I'm inclined to make an OpenStruct-like interface to the Asterisk
  environment, but I need to make sure there won't be any metaprogramming
  conflitcs

== License
Copyright:: Copyright (C) 2007 Hans Fugal <mailto: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[http://eigenclass.org/], though I think he's swell too.

The image is from an
article[http://www.millionaireplayboy.com/toys/batphone.php] on building your
own physical batphone at Millionaire Playboy.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server