[asterisk-dev] Asterisk AGI 2.0 - with doc

Lee Jenkins lee at datatrakpos.com
Wed Oct 24 17:10:06 CDT 2007


Zoltan Gaspar wrote:

> 
> The same way as in the early days of processors Complex Instruction Set 
> Computers (CISK) were implemented, Asterisk started with defining high 
> level applications adding more and more options and applications to it's 
> Dial Plan (Asterisk's Instruction Set). We have come to a great landmark 
> where it is needed to rethink the granularity of the commands, to 
> structure the types of commands and there parameters so that we will 
> have a full set of basic operations. A full set of basic operations is 
> the minimal number of basic operations (instructions) that have the 
> property that every other operation is a compose of one or more of basic 
> operations.
> 

I like the work the developers have done so far to more standardize application 
into function calls.

> 
> Another new concept that we need to seriously take into consideration 
> are the AGI events. In the current AGI implementation there is no 
> mechanism to send asynchronous notifications to the AGI script. This 
> would be useful to control DTMF, SIP-call flow (an event can be 
> generated when receiving the 200 OK for an Invite) events and so on. 
> This could be implemented by putting the message in a channel variable 
> and sending a signal to the AGI script.
> 

By this do you mean to have AGI applications run automatically in response to 
events that fire within Asterisk and then Asterisk sends some initial relevant 
parameters with the call?  I like that.  That could actually provide a lot of 
miles for integrators, IMO.

While its nice to have a lot of built in functions, most of the agi abstraction 
layers available for different languages do much of this for us, especially 
Asterisk-Java.  I'm not a Java programmer, but I read through some of the docs 
and they've done an outstanding job of building an OO framework for Asterisk IMO.

I'm a Delphi/Freepascal guy, so I wrote a pascal based FastAGI scripting server 
with lazarus/freepascal and in addition to basic object pascal syntax and 
support, I've exposed a number of objects through the script engine for things 
that I've needed like DB Access, Swift TTS, CallBroadcaster, etc.  This works 
great for me.

The existing AGI interface commands are easy enough to aggregate into whatever 
wrapper you want.  Heck, there's even one for .net written C#.

As Tilghman pointed out, AGI is a synchronous model, probably on purpose to make 
real-time call control possible.


What I would like to see is some more standardization with the AMI.  XML would 
be wonderful to see in replace of the current output which seems more designed 
for character display.


--
Warm Regards,

Lee




More information about the asterisk-dev mailing list