[asterisk-dev] Asterisk AGI 2.0

Moises Silva moises.silva at gmail.com
Wed Oct 24 09:33:39 CDT 2007


Gaspar,

    First let me thank you for bringing this up into the list. This
looks a lot like something we  implemented in the company I used to
work for. We defined a PHP API to do exactly the operations you
mention asynchronously, that's why I worked hard to push the Bridge()
manager and dial plan applications into Asterisk code base, we wanted
full control of the channels with basic operations ( Answer, Hangup,
Transfer, Bridge, MultipleBridge etc ) without using extensions.conf
or extensions.ael. We did not even wanted to use AGI() either. We
choose something different that you might not know, since we never
pushed the patch into the Asterisk code base.

Have you heard about MAGI() ? Is a combination of AGI and the Manager.
It was originally written by David Pollak. You can read more about it
here:

http://www.sineapps.com/news.php?rssid=594
http://lists.digium.com/pipermail/asterisk-dev/2004-August/005723.html

Unfortunately David lost interest, I continued using MAGI with our PHP
basic API to achieve the basic operations you mention using MAGI. I
continued porting the patch until 1.2.x, however, later on I also
quited my VoIP job and since then I have been only thinking in
eventually be able to discuss the idea again.

I think I have exactly the same feeling you have. Asterisk should
delegate as much as possible to the *real* programming languages
exposing the set operations you have mentioned and build more advanced
applications on top of that.

With MAGI you can actually execute any AGI command you currently can
in ANY channel currently alive in the PBX inside MAGI() application.
You can receive events on ALL channels and react with more AGI or
Manager commands/actions based on those events.

Some proof of concept applications we wrote included PBX features like
transfer and the like, without using Asterisk res_features.so. We Just
used MAGI to call Bridge, Redirect and capture DTMF in the middle of a
call to take those decisions from within PHP. Of course, any
programming language could be used instead. We basically had a single
daemon listening for events and sending AGI commands to the channels.

As Martin stated, is difficult to get rid of the Dial Plan, but I
don't feel that is something necessary. Pushing MAGI into the Asterisk
trunk as another application could be the first step towards having
full control of the PBX as a whole from a programming language.

Comments?

Moy

On 10/24/07, Gaspar Zoltan <gasparz at gmail.com> wrote:
> Hi all,
>
> This google docs publishing thing is a little bit new to me. I put it on
> another account. And tried it on another computer. This link works.
>
> http://docs.google.com/Doc?id=dgrzqb36_8c6j439
>
> Thanks, and waiting your opinions
>
> Zoltan Gaspar
>
> -----Original Message-----
> From: asterisk-dev-bounces at lists.digium.com
> [mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Tony Mountifield
> Sent: Wednesday, October 24, 2007 12:22 PM
> To: asterisk-dev at lists.digium.com
> Subject: Re: [asterisk-dev] Asterisk AGI 2.0
>
> In article <471f0301.1c365e0a.1f06.6244 at mx.google.com>,
> Gaspar Zoltan <gasparz at gmail.com> wrote:
> >
> > I would like to start a discussion about the AGI, about how it should be
> > modified to make asterisk more powerfull.
> >
> > I started a document, if you have time please read it and give me (and the
> > asterisk developer community) your 2 cents about it. It's not a long
> > document, shoudn't take more then 5 minutes.
> >
> >  <http://docs.google.com/a/teamanswers.com/Doc?id=dcxr8kn4_14dxjq4b>
> > http://docs.google.com/a/teamanswers.com/Doc?id=dcxr8kn4_14dxjq4b
>
> Can't get to it without creating a teamanswers.com account (I hate having
> to create an account on a site just to look at stuff). Could you put
> it somewhere public instead?
>
> Cheers
> Tony
> --
> Tony Mountifield
> Work: tony at softins.co.uk - http://www.softins.co.uk
> Play: tony at mountifield.org - http://tony.mountifield.org
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>


-- 
"Within C++, there is a much smaller and cleaner language struggling
to get out."



More information about the asterisk-dev mailing list