[Asterisk-Dev] New AstManProxy Manager Proxy v0.98

David Troy dave at popvox.com
Tue Apr 19 13:30:33 MST 2005


Hey folks -- I have written a new multithreaded Manager Proxy in 
c/pthreads called AstManProxy for use with Asterisk.  Several folks have 
been testing it and offering me feedback.  Please read below and give it a 
try.  If you are looking for a foundation for XMLRPC, etc, sorts of 
interactions, this may be a good approach for you.

Code is here:  http://www.popvox.com/astmanproxy-latest.tgz

Regards,
Dave
--
David C. Troy
President/CEO
popvox, LLC
dave at popvox.com
410-647-5812

===================================================================
Developing web-based realtime applications for the asterisk
open-source PBX often requires interacting with asterisk's Manager
interface.  The Asterisk Manager runs on port 5038 by default and
provides a simple TCP interface into several common asterisk
functions, including call origination, redirection, hangup, and many
other functions.

Each interaction from a web-based application requires a separate
connection to the manager interface.  Asterisk, being a real time
application, shouldn't have to deal with the load of constant
connections, disconnections, and authentications from a single
trusted client, namely your web app.

In the same way that web developers have solved this problem for
other similar services (imapproxy for IMAP web mail clients,
database connection caches, etc), 'astmanproxy' sets out to solve
this problem for asterisk.

This project started out as a simple proof-of-concept script called
"simpleproxy.pl" which was made available in September 2004,
following a discussion at the Astricon conference regarding the need
for such a proxy.  That code was based on Nicolas Gudino's manager
proxy for his excellent Flash Operator Panel.  Written in perl and
as a single-threaded select-based "dumb" proxy, simpleproxy.pl has
been widely used as a basis for experimentation, but I wanted
something more robust and that could act as a basis for additional
features.

Several other folks have experimented with adding XML output to the
standard manager interface, however, Mark Spencer has made it clear
that he does not want to add XML interfaces into the Asterisk core.
This is an understandable design decision.

Asterisk Manager Proxy is a multithreaded proxy server for Asterisk
Manager written in c, and based on several of the same data
structures and routines found in the asterisk manager itself.  This
insures a very high degree of compatibility with Asterisk; it should
also be very robust and scalable.

Asterisk Manager Proxy gives the ability to support XML or standard
output format, configurable on a per-client basis.

===================================================================
INSTALLATION:

   ./make
   make install

===================================================================
Additional Proxy Features

In addition to exposing the entire Asterisk Manager API as a
pass-through, non-interpreting proxy, 'astmanproxy' can parse client
input where desired; this could be used in the future to add new
features that make sense to be in a proxy but that don't necessarily
need to be in Asterisk proper.

Some "ProxyActions" have been implemented which the Proxy responds to
but does not pass on to Asterisk itself:

ProxyAction: ListClients
    Outputs a list of current Proxy clients

ProxyAction: SetOutputFormat
OutputFormat: (standard|xml)
    Sets the output format on a per-client basis

ProxyAction: SetAutoFilter
OutputFormat: (on|off)
    Sets the AutoFilter property on a per-client basis

ProxyAction: Logoff
    Logs client out of Proxy and leaves Asterisk alone; the proxy
    also intercepts "Action: Logoff" and interprets it as
    "ProxyAction: Logoff".  This keeps the proxy from disconnecting
    from Asterisk.

===================================================================
Author Contact Info

This code is intended primarily as a foundation for others to add new
features and capabilities going forward.  While I will attempt to
keep up with it and add to it, I make no guarantees that I'll be able
to do that.  My hope would be that the wonderful asterisk community
will start making changes, and that those changes can be managed
through Digium's great CVS process.

However, you can concact me at dave at popvox.com, and I will endeavor
to post the latest code here:

http://www.popvox.com/astmanproxy-latest.tgz

Donations are accepted via paypal to dave at toad.net.

===================================================================

-- 
David C. Troy
President/CEO
popvox, LLC
dave at popvox.com
410-647-5812



More information about the asterisk-dev mailing list