<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Howdy,<br>
<br>
I've been doing some development with Asterisk and AGI.&nbsp; I'm using a
Java/J2EE application server for my business logic and database access.<br>
<br>
In order to integrate my app server with Asterisk and AGI, my app
server opens a Manager API connection to the Asterisk server.&nbsp; My dial
plan is basically AGI(passthrough.py) which fires off a Python script
that opens a socket connection to my app server and forwards the bytes
from Asterisk to the app server and from the app server to Asterisk.&nbsp;
Lots of open sockets... lots of processes... lots of "selects" on the
incoming ports to see the traffic... all in all, no fun.<br>
<br>
So, I've been looking over the Asterisk source and I had an idea...
what if there was a merger of the Manager API and AGI.&nbsp; Here's
specifically what I was thinking:<br>
- Extend the Management API to accept an "AGI" command which would
contain a Channel ID, an AGI command line, and a unique ID<br>
<blockquote>Action: MAGI<br>
Channel: SIP/12345<br>
Command: meetme 1234<br>
UniqueID: 22882292992929<br>
</blockquote>
- Add a ast_magi struct that contains an AGI command, a "unique ID",
and a pointer to the next ast_magi (i.e., the ast_magi is a linked list)<br>
- Add a pointer to the MAGI struct into the ast_channel struct<br>
- Add functionality to the ast_channel cleanup code to destroy any
ast_magi structs in the linked list<br>
- Add helper routines to add an ast_magi to an ast_channel, get the
first ast_magi from a channel, etc.<br>
- Significant updates to res_agi.c to check the channel for available
ast_magi structs and execute them as well as sending the output to the
right place (manager_event rather than right to the file descriptor)&nbsp;
Note that MAGI responses are URL encoded to that responses that contain
':' newline chars, etc. will fit on the Response line<br>
<blockquote>Reponse after a MAGI command is executed:<br>
MAGI: 22882292992929<br>
Response: 200%20Success%20Result<br>
</blockquote>
- Add a flag to EVENT_FLAG for MAGI events<br>
<br>
I've got the changes made to the codebase.&nbsp; I'd like to get them
accepted back into the Asterisk distribution so that my copy of
Asterisk is in sync with the rest of the world.&nbsp; What do I have to do
to get the changes accepted?<br>
<br>
Thanks,<br>
<br>
David
</body>
</html>