[asterisk-dev] Unified Asterisk Interface

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue Dec 11 12:17:06 CST 2007


On Tuesday 11 December 2007 11:09:20 Matthew Rubenstein wrote:
> > Um, one is a synchronous interface that is a child of the Asterisk
> > process
> > itself (AGI) and the other is an asynchronous interface that can be
> > used
> > from anywhere (AMI).  I don't see how you could possibly combine the
> > two
> > and get a coherent interface.
>
> 	I don't see why an AGI process can't open a connection to the AMI, so
> the AGI interface is still available AND the AMI interface is available
> for sending commands and receiving/filtering events.

Absolutely.  That's what you do now, and that's what works.

> I'd like to see AGI 
> extended include that AMI interface, including "event callbacks"
> registered when the AGI starts (or whenever), that are functions in the
> AGI script.

How exactly do you register callbacks across a TCP/IP (or simply an I/O)
connection?  The send/receive operation inherent in a synchronous connection
does not react kindly to being interrupted in the middle.  You can only do
that with multiple connections:  one for your synchronous control, one for
asynchronous events.  And that is precisely what we have now.

You still have not addressed the fundamental point that the connections
are inherently different and require completely different models of operation.

And BTW, please reply to the list.  I do not need two copies of the same email
in my inbox.

-- 
Tilghman



More information about the asterisk-dev mailing list