Huge thanks to Joshua Colp for mirroring services

David Troy releases Simple Manager Proxy

Share on Twitter Digg this story Click to view a printable version Mon, 27 Sep 2004 13:01:11 +1200

If you have developed CGI, PHP or other synchronous web-based applications that utilize the Asterisk manager interface, you know that they don't scale well, since each invocation from the web requires a connection to Asterisk and authentication there (thus putting a potentially large amount of connection and authentication load directly onto asterisk).

There has been some discussion as to how to address this; some folks are talking about databases, others have developed specialized 'middleware' to bridge between the code at the edge and Asterisk. Nicolas Gudino's Flash Operator Panel is one such piece of code.

I had a need for a much simpler proxy than his op_server.pl; to meet my need I re-worked and simplified his code. See below for this simplified proxy:

http://www.popvox.com/simpleproxy.pl

It's *very* simple: connects to Asterisk manager with a single authenticated connection, and listens on a configurable port (1234 by default) for inbound connections.

Any commands passed from client->proxy are forwarded to Asterisk. Any events passed from asterisk->proxy are forwarded to all connected clients. They all share a common connection context so all clients will see the same thing, all clients will share the rights of the authenticated user.

I make no pretense that this is particularly good code; I'm putting it out there for now as it helps me with testing something I'm working on, and it may be of use to others -- maybe we can start the ball rolling on something a bit more robust.

Uses for this include:

- Making a web-services/XMLRPC wrapper for asterisk manager
- Building simple web-based applications
- Backend for scalable, heterogeneous operator panels
- Insulating Asterisk manager internals from user community

Some potential next steps/enhancements for this basic design might be:

- Test for robustness/IO interruptions on either side
- Creating a connection pool of n (configurable) connections to *
manager - Tracking connection contexts for clients - Redo with
c/pthreads for speed (imapproxy is someplace to look) - Utilize libwrap
to control access - Implement a simple authentication mechanism - Add
TLS to clients for secure manager interactions

Right now it is assumed that you will use this proxy in a secured environment -- either listening on localhost only, on a private LAN or behind a firewall. If you do not take some precautions you may be opening up a completely unauthenticated proxy to your * box!!

Let me know if you have questions/thoughts/comments about this.

Thanks,
Dave

--
David Troy
popvox, llc


You haven't voted yet! Vote:
Current Rating: 0/10 (0 votes)

Comments (Click to post)

Comments
Name:
Subject:
Website:
Message: 

Similar Articles (Based on Title)

Interview with David Mandelstam - November 30, 2004
We've just completed an interview with David Mandelstam, the CEO of Sangoma

Tutorial: Simple queue and agent debug monitoring - October 11, 2006
Lenz has posted another tutorial, this one on receiving just the information you need in a call center.

New AstManProxy Manager Proxy v0.98 - April 20, 2005
David Troy has posted details of his new multithreaded manager proxy.

New Asterisk Manager Proxy -- astmanproxy 1.0 - June 13, 2005
David C. Troy has posted details of a new Asterisk Manager Proxy.

Hat-Squad Advisory: Remote Heap Corruption Vulnerability in Interaction SIP Proxy - December 30, 2005
Hat-Sqad has posted details of a security hole in the Windows based SIP Proxy.

SIP outbound proxy for 1.4 - now working - February 7, 2007
Olle has posted details of a branch that fixes outbound proxy in Asterisk 1.4

SIP Outbound Proxy in obproxy 1.4 branch and trunk - March 19, 2007
Olle is looking for comments on the Outbound Proxy Branch.

Pinetree - For Asterisk SIP trunks behind a SIP proxy - September 2, 2009
Olle is working on code to make Asterisk work better behind a proxy.

VoxBox releases Asterisk Management Console - October 16, 2004
Jason Becker of Coalescent Systems Inc. has released his VoxBox Asterisk Management Console (a gui interface to Asterisk Configs)

Flash Operator Panel: New naming for daily snapshots releases - March 17, 2005
Nicolas Gudino has posted details of a new naming method for Flash Operator Panel releases.

chan_capi-cm-0.5.2, 0.5.3 fixup releases - July 1, 2005
Armin has posted details of the latest releases of the sourceforge based chan_capi-cm


Original Content (C) 2004-2010 Matt Riddell
Back 5  Feed Add
to
Google Subscribe with Bloglines
Go to today

Icons by: FastIcon.com


AstriDevCon: October 29th, Washington DC
August 23, 2010 Average Vote: 10
John Todd has posted a note about the AstriDevCon conference which occurs within the Astricon conference.

Code Review: SRTP support for Asterisk
March 12, 2009 Average Vote: 10
Terry Wilson has moved his SRTP branch onto the Digium review board.

The Everything Asterisk Video Collection
August 5, 2010 Average Vote: 10
Steven Sokol has posted a blog entry on Asterisk Video Resources.

Voip-Forum: Lots of new articles
March 12, 2005 Average Vote: 10
Oej's Voip-Forum.com site has posted lots of new news articles while I've been away. Hopefully you found them via the asterisk-docs site. If not I've bookmarked them for you.

Interview with Mark Spencer
November 26, 2004 Average Vote: 9.9
We have managed to get an interview with Mark Spencer AKA Markster. Mark Spencer is the creator of Asterisk and by far the most active developer.

Asterisk and Kamailio realtime integration tutorial
May 24, 2010 Average Vote: 9.9
Daniel-Constantin Mierla has posted a link to a tutorial on integrating Asterisk and Kamailio using realtime.

Asterisk and Kamailio (openser) realtime integration
August 5, 2010 Average Vote: 9.8
Daniel-Constantin Mierla posted a writeup on combining Asterisk and Kamailio.

Asterisk IPv6 update
February 1, 2010 Average Vote: 9.8
Olle has posted an update on IPV6 in Asterisk and a link to a blog post of his.

Proposal for T.38 transparent gateway design in Asterisk
April 29, 2010 Average Vote: 9.8
Kevin Fleming has posted a proposed design for a transparent T.38 gateway for Asterisk:

Back to life
July 21, 2010 Average Vote: 9.8
Hey all - I am back online after some pretty big projects which have taken all my time. Will be updating the Asterisk news over the next few days.

Announcing Adhearsion 0.8.5
August 25, 2010 Average Vote: 9.8
Ben Klang has posted a note about the latest release of Adhearsion - a framework for developing Asterisk based solutions using Ruby.

app_swift v2.0 released
July 21, 2010 Average Vote: 9.8
Like a few of these news stories that I will be posting over the next couple of days this is a little old - hope it is not something you have already seen. This one is for a new version of the app_swift text-to-speech module for Asterisk 1.2, 1.4, and 1.6.

Monitoring Asterisk with Munin
January 7, 2010 Average Vote: 9.7
I had a few requests for these munin plugins after some discussion on one of the Asterisk lists and thought people might like them.

GUI changes from Trixbox, FreePBX, 2600hz, BlueBox
September 1, 2010 Average Vote: 9.7
Ok, bear with me on this one. If you understand all the ramifications, FreePBX has split to a new project called BlueBox contained within the 2600hz project. This obviously has implications for Trixbox that uses FreePBX to provide quite a bit of functionality.

Nerd Vittles: Finally... Installing Asterisk at Home on Your Windows PC
February 9, 2006 Average Vote: 9.7
Ward Mundy has posted details of a how to for installing Asterisk at Home on a windows machine without removing windows.


Asterisk 1.8.0-beta5 Now Available
September 9, 2010
The Asterisk Development Team has announced the release of Asterisk 1.8.0-beta5.

libpri 1.4.11.4 Now Available
September 3, 2010
The Asterisk Development Team has announced the release of libpri 1.4.11.4.

New CDR Stats Package
September 1, 2010
This one has been a long time coming. A new CDR stats package from Star2Billing to replace the 7 year old stalwart for viewing Asterisk call detail records.

GUI changes from Trixbox, FreePBX, 2600hz, BlueBox
September 1, 2010
Ok, bear with me on this one. If you understand all the ramifications, FreePBX has split to a new project called BlueBox contained within the 2600hz project. This obviously has implications for Trixbox that uses FreePBX to provide quite a bit of functionality.

RazorQuotePBP Asterisk Payment Module
August 31, 2010
RazorQuote has sent us a press release about the launch of RazorQuotePBP, a native Asterisk module that allows any Asterisk connected device to accept credit card payments.

CloudVox: Install an open source Asterisk phone app and get 250 dollars
August 30, 2010
CloudVox is running a competition for people to receive 250 dollars for writing up some documentation for Open Source applications on CloudVox - first in first served.

AstriCon approaches
August 25, 2010
John Todd has posted a note about the upcoming AstriCon conference in Washington, DC, and the innovation awards.

Announcing Adhearsion 0.8.5
August 25, 2010
Ben Klang has posted a note about the latest release of Adhearsion - a framework for developing Asterisk based solutions using Ruby.

Asterisk 1.8.0-beta4 Now Available
August 25, 2010
The Asterisk Development Team has announced the release of Asterisk 1.8.0-beta4.

AstriDevCon: October 29th, Washington DC
August 23, 2010
John Todd has posted a note about the AstriDevCon conference which occurs within the Astricon conference.