[Asterisk-Dev] Manager XML
Chris Howard
chris at asteriasgi.com
Thu Mar 3 10:39:42 MST 2005
----- Original Message -----
From: "Adam Goryachev" <mailinglists at websitemanagers.com.au>
> So, perhaps we need to simplify the manager interface, and return it
> back to a pure event broadcast system, and add another interface which
> we can send/receive request/responses in. As far as the format that we
> would submit the requests in, and the format to receive the response in,
> I don't really want to comment on too much. tag:value seems very
> flexible/extensible, and seems to work quite well for every case I've
> seen. However, I am sure there are cases where XML would be ... more
> convenient... but I'm not convinced we couldn't still do all this in
> tag:value format....
Adam,
I agree with you that the interface should be divided into two separate
interface. One for system events and the other for action/response
messages. The problem is that the interface is not consistent. Some
actions generate responses as in "Action: MailboxStatus" and other actions
generate events as in "Action: Status". This makes it very hard to separate
them.
Distributing/broadcasting Events and accepting Actions/Resonses from/to
clients is a different story. What we needed was some sort of message bus
that the asterisk manager could broadcast event messages to all client as
well as receive actions and send responses in a peer to peer fashion. We
looked at various middleware solutions and none really seem to fit what we
were trying to do. As pure message oriented middleware Spread seems to be
the best fit but there was an issue (I can't remember what it was) that kept
us from using it. We came up with what I think is a very unusual but
creative solution of using an IRC server as the message bus. We created a
server proxy using the very well designed asterisk-java package. This proxy
logs into the ircserver and joins a channel. All of the events that are not
filtered by this proxy server are sent to the channel is a format we
defined. Multiple proxies from multiple asterisk servers can join the same
channel and send events. The client applications login to the IRC server
and join a channel. All of the broadcast events are sent to the channel and
the client can deal with these events however it wishes. For the
Action/Response the client sends a private message to the proxy irc user and
the receives a response via private message from the proxy. We use a
modified version of pircd as the IRC server (stripped out throttling and
other unneeded "features"). It would probably be very easy to replace the
IRC server with a more traditional message oriented middleware if scaling
was ever an issue however as far as I know IRC scales very well. I can write
up a more detailed explanation and throw the code on a cvs server if there
is any interest.
Chris Howard
Asteria Solutions Group
office: 256.705.0262
toll free: 877.274.4463 ext. 0262
mobile: 256.520.1525
fax: 256.705.0280
Ask me about Asterisk!
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 266.5.7 - Release Date: 3/1/2005
More information about the asterisk-dev
mailing list