[asterisk-dev] Unified Asterisk Interface

David Roden dr at ina-germany.de
Tue Dec 11 10:56:31 CST 2007


On Tuesday 11 December 2007 17:24:30 Steve Edwards wrote:

> > Right. Currently I have to add three different AGI calls to an Asterisk
> > dialplan for my application to work. This is something I would like to
> > get rid of, or cut down at least to the required minimum--which would be
> > a single line.
> Don't dump on AGIs too much :)
> Even a wimpy 1.6gHz Celeron can execute 100 AGIs per second.

You're not understanding me. Performance is the least of my worries. When I 
want to place an outbound call from my Java application I have to do all 
this:

1. Setup an extension (say, "dialout") that executes AGI(agi://host/out).
2. Setup an extension ("control") that executes AGI(agi://host/control).
3. Place an outbound call via AMI to Local/dialout at context that jumps to 
extension "control" on connect.
4. Accept the incoming connection on dialout.
5. Dial the number I really want to reach and keep the connection.
6. Accept the incoming connection on control and keep it waiting.
7. Trace various renames of the involved local channels so that I know which 
channel is the real outbound channel which has to be watched for events.
8. On hangup, notify the two waiting threads so that all channels can be taken 
down.

(Okay, actually 1 and 2 only have to be done once.)

And all this so that I can use ReadDTMF on an AGI channel with an outbound 
call. (And setting caller ID and stuff in 4.5 (which I omitted) which does 
not work with AMI and chan_ss7.)

This would be _much_ simpler if I wouldn't have two incomplete APIs to work 
with. :)

(At least that's my opinion. To me Asterisk is a black box that handles phone 
connections. I'll be damned if I know why I have to jump through all those 
hoops.)

What Asterisk needs (in my opinion) is some kind of Super-API which can handle 
EVERYTHING. The AGI-in-AMI patch is pretty close to that concept. I don't 
really need to process each incoming call in its own thread, I just need to 
be notified that there is a call and be able to work with it. That's all. :)

AGI probably has its uses, I have no doubt. But having two APIs of which 
exactly 0 can handle everything Asterisk has to offer is--I don't know. It's 
probably grown that way and you've all grown attached to it. I didn't really 
expect anyone to say, "hey, you're right, we'll get right on it." ;)

Anyway, I'd be delighted if someone gave this consideration at some point in 
the future.


	David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20071211/a80670fe/attachment.pgp 


More information about the asterisk-dev mailing list