[Asterisk-Users] AGI + Ruby

Dan Littlejohn dan.littlejohn at gmail.com
Mon Sep 12 14:47:24 MST 2005


On 9/12/05, joe heitzeberg <jheitzeb at alum.mit.edu> wrote:
> Hi Seshu,
> 
> RAGI communicates with your Asterisk server over a socket, allowing
> you to create your call handling scripts in Ruby or Ruby on Rails.
> This allows you to build complex routines that using object models and
> database lookups in Ruby [on Rails], and not have to split your
> business logic across your app server and Asterisk's config files such
> as extension.conf.  It makes it easy to do things like:
> 
> user = User.find("phonenumber", connection.getVariable("callerid")
> if (user.balance()) < 5.00)
>    connection.playSound("your-account-balance-is-low")
>    #send email, send sms
>    #update something in the database, etc
> end
> # The above is the same code and object model as used in your web app
> 
> Joe
> 
> 
> 
> On 9/12/05, Kanuri, Seshu (Company IT) <Seshu.Kanuri at morganstanley.com> wrote:
> > What can RAGI do additionally that AGI or FastAgi and DeadAgi cannot do
> > which is already available under Asterisk?
> >
> > Seshu Kanuri
> >
> > -----Original Message-----
> > From: asterisk-users-bounces at lists.digium.com
> > [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of joe
> > heitzeberg
> > Sent: Sunday, September 11, 2005 12:31 PM
> > To: Asterisk Users Mailing List - Non-Commercial Discussion
> > Subject: Re: [Asterisk-Users] AGI + Ruby
> >
> > Hi,
> >
> > We have created RAGI (Ruby Asterisk Gateway Interface) for the open
> > source community so that Ruby and Ruby on Rails can be used to easily
> > and effeciently create Asterisk-based applications.  Examples:  IVR,
> > call center apps, Asterisk management consoles, etc.
> >
> > RAGI includes a set of objects to interface over AGI to Asterisk for
> > handling inbound calls and outbound dialing, and includes a server
> > component, documentation and a sample apps to get you going quickly.
> >
> > Please see:     http://ragi.sourceforge.net/
> >
> > The prelimenary release is available now on
> > https://sourceforge.net/projects/ragi
> >
> > We welcome input and development participation in the effort.
> >
> >
> > thanks,
> > Joe Heitzeberg
> > SNAPVINE
> >
> >
> >
> > On 8/24/05, Innocent Evil <innocent.evil at inbox.com> wrote:
> > > I would like to write AGI script in Ruby Would anybody please show me
> > > right direction..
> > >
> > >
> > > Thanks_______________________________________________
> > > Asterisk-Users mailing list
> > > Asterisk-Users at lists.digium.com
> > > http://lists.digium.com/mailman/listinfo/asterisk-users
> > > To UNSUBSCRIBE or update options visit:
> > >    http://lists.digium.com/mailman/listinfo/asterisk-users
> > >
> > _______________________________________________
> > --Bandwidth and Colocation sponsored by Easynews.com --
> >
> > Asterisk-Users mailing list
> > Asterisk-Users at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
> > --------------------------------------------------------
> >
> > NOTICE: If received in error, please destroy and notify sender.  Sender does not waive confidentiality or privilege, and use is prohibited.
> >
> _______________________________________________
> --Bandwidth and Colocation sponsored by Easynews.com --
> 
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 

Joe:

You could do the same thing using PERL and strong classing.  

sub new {
	my ($class) = @_; 
	my $this = {}; 
	bless($this,$class); 
	return $this;
} 

Why would you pick Ruby over this? (not flaming, just trying to
understand the advantages)  Granted, classes in Perl or PHP are not
perfect, but If you have to setup a socket and have the overhead, what
are the advantages?

Dan



More information about the asterisk-users mailing list