Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Higher level API on top of AMI and AGI (was


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
lee at datatrakpos.com
Guest





PostPosted: Tue Feb 05, 2008 11:32 am    Post subject: [asterisk-users] Higher level API on top of AMI and AGI (was Reply with quote

Stefan Reuter wrote:
Quote:
Lee Jenkins wrote:
Quote:
I thought that the OP was asking for something to perl what Asterisk-Java does
for java coders. I would definitely consider Asterisk-Java to be a framework,
though not so much with PasAGI which is more of an class object wrapper around
AGI functions that I wrote a while back because I'm lazy that way Wink

Indeed and I think such a higher level API could be implemented in
different languages. There is/was a port of the Asterisk-Java API to
.Net at least. I think especially the "live" API of Asterisk-Java is
worth having a look at. It provides an object view on top of AMI with
rich objects like Channel and methods like hangup() and redirect().
So it makes the developer focus on his tasks rather than thinking in
terms of actions and responses.

Asterisk 1.6 includes a new feature that allows using AMI as a transport
for AGI commands, there abstraction becomes even more important.
For Asterisk-Java I am currently adding support for that in a way that
allows the developer to run the same "AGI" code either through FastAGI
or AMI without knowing about the underlying details.

Where is more information on this new feature for Asterisk 1.6? Any details?

Quote:

If someone is interested in defining a language-neutral general higher
level API that can be implemented in a variety of languages I am happy
to support this effort.
This would be refreshing as the current AMI output is a little all over the
place. Example:

Conf Num Parties Marked Activity Creation
111 0001 0001 00:17:57 Dynamic

Above is a line from MeetMe command issued from AMI. After the header line,
each successive line denote information about a conference. No problems there,
except there is an extraneous Tab (#9) character right after the "Parties" field
which screws you up when parsing until you figure out that there is a Tab
character there. There appears to be no reason to have a tab character there
that I can see, well maybe to trip up unwary developers Wink

Quote:
Quote:
I'm not sure what your point is, but I'll say that I'm a definite proponent of
abstraction layers provided they don't bar access to lower level logic when I
need it. I think you'll agree that good abstractions lend themselves to reuse
and reduced development time (easy of use, less runtime logic errors, easier to
extend, etc).

And don't miss the additional benefit of supporting multiple versions of
Asterisk that you get almost for free. Asterisk-Java will run with
Asterisk from 1.0 to 1.6 without changing your code even if the Asterisk
guys decide to rename properties and the like.
Just have a look at doc/manager_1_1.txt in the betas of Asterisk 1.6 and
decide what your efforts would be to support Asterisk 1.4 and 1.6 if you
stick to low level APIs.

Another great reason for abstraction/encapsulation IMO.

--
Warm Regards,

Lee

"Everything I needed to learn in life, I learned selling encyclopedias door to
door."
Back to top
moises.silva at gmail.com
Guest





PostPosted: Tue Feb 05, 2008 11:52 am    Post subject: [asterisk-users] Higher level API on top of AMI and AGI (was Reply with quote

Quote:
Quote:
Asterisk 1.6 includes a new feature that allows using AMI as a transport
for AGI commands, there abstraction becomes even more important.
For Asterisk-Java I am currently adding support for that in a way that
allows the developer to run the same "AGI" code either through FastAGI
or AMI without knowing about the underlying details.

Where is more information on this new feature for Asterisk 1.6? Any details?

I wrote this blog entry when I was writing the AsyncAGI feature:
http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/

This is the bug entry: http://bugs.digium.com/view.php?id=11282

I changed my mind regarding the behavior of this feature after opening
the bug entry, so the initial description of the bug can be confusing
and totally different from the final implementation and behavior, so
you will have to read all the comments in the bug entry to understand
what is this about.

Mois?s Silva

--
"I do not agree with what you have to say, but I'll defend to the
death your right to say it." Voltaire
Back to top
lee at datatrakpos.com
Guest





PostPosted: Tue Feb 05, 2008 11:30 pm    Post subject: [asterisk-users] Higher level API on top of AMI and AGI (was Reply with quote

Moises Silva wrote:
Quote:
Quote:
Quote:
Asterisk 1.6 includes a new feature that allows using AMI as a transport
for AGI commands, there abstraction becomes even more important.
For Asterisk-Java I am currently adding support for that in a way that
allows the developer to run the same "AGI" code either through FastAGI
or AMI without knowing about the underlying details.
Where is more information on this new feature for Asterisk 1.6? Any details?

I wrote this blog entry when I was writing the AsyncAGI feature:
http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/

This is the bug entry: http://bugs.digium.com/view.php?id=11282

I changed my mind regarding the behavior of this feature after opening
the bug entry, so the initial description of the bug can be confusing
and totally different from the final implementation and behavior, so
you will have to read all the comments in the bug entry to understand
what is this about.

Mois?s Silva


Thanks. That's pretty slick. It could add some flexibility, but as you noted
on your blog, you could just as easily redirect to a FastAGI server, etc.

Being able to call AGI's on a channel through the AMI seems like it could have
some possibilities as well.
--
Warm Regards,

Lee

"Everything I needed to learn in life, I learned selling encyclopedias door to
door."
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services