Re: [Asterisk-java-devel] AstManProxy
Brought to you by:
srt
From: Cristian T. <ct...@ro...> - 2006-02-28 20:23:14
|
Well, AstManProxy defines itself as a "pass-through" proxy, even though it intercepts a couple of actions (Login/Logoff). It adds few proxy-specific extensions to the Asterisk Manager protocol but it doesn't interfere with the rest of the data being passed through, other than changing the protocol string :). The only two problems I had to deal with (aside from the protocol string) were: 1. AstManProxy doesn't seem to let the Challenge-Response communication pass through (I have to check the source code in order to find out why). 2. The Login process is bypassed, given that the proxy is actually the only one authenticating and talking to the Manager. AstManProxy will return a fake Response with no actionId following a Login request - that tricks the Asterisk-Java response handler. (1) may be a problem if you rely on encryption, but it's not that bad because AstManProxy has it's own authentication mechanism: it can be configured to require a ProxyKey parameter in the first message sent to the Manager in order to let you connect. I can see the value of a proxy when you have to allow multiple connections to the same server - a proxy will take the burden off of Asterisk's shoulder's - that's why I looked into it and gave it a try. The Asterisk-Java API changes would be minor - assuming you always expect to talk to an Asterisk Manager interface. For that reason I don't think a new protocol implementation is required for Asterisk-Java to work with AstManProxy. Maybe the best solution is to do a bit of "edge-softening" work on both sides - I didn't get in touch with the AstManProxy team yet :) Thanks, Cristian ----- Original Message ----- From: "Stefan Reuter" <sr...@re...> To: <ast...@li...> Sent: Tuesday, February 28, 2006 1:53 PM Subject: Re: [Asterisk-java-devel] AstManProxy Hi Christian, I think the best solution would be to just add support for the "Asterisk Manager Proxy" protocol. Regarding the version Asterisk-Java is already rather forgiving, i.e. if it doesn't get what it expects it will only log a message. Making it fully configurable calls for problems as I suppose that a different protocol will also behave quite different (the manager proxy might be different in this regard). What do you think? =Stefan Cristian Talle wrote: > Hi, > > I tried to use the asterisk-java api to connect to Asterisk Manager via AstManProxy and it didn't work. The code appears to deal only with "Asterisk Call Manager" v. "1.0". AstManProxy is (currently)substituting the product version string with "Asterisk Manager Proxy/1.12". > > I implemented some changes myself - just enough to get it working :) and I was wondering: would it not be a good idea to pass the expected manager interface name / version parameters to the ManagerConnectionFactory.getConnection(...)? |