Re: [Asterisk-java-devel] AstManProxy
Brought to you by:
srt
From: Cristian T. <ct...@ro...> - 2006-03-01 13:09:41
|
Stefan, We could hide that behind the connection factory and add a new ManagerConnection class that has a slightly different connect/login process. The line ProxyKey: [key] needs to be included in the first request to AstManProxy in order to authenticate the user (provided the proxy is configured to require an authentication key). If the client sends the right key in the first request, the connection is established, otherwise it is refused. As for challenge-response - I think it is just a matter of allowing the Challenge action to pass through AstManProxy (right now it returns an "Unknown command/action" response). I'll look into implementing the right set of patches and will let you know when I'm done. Thank you, Cristian ----- Original Message ----- From: "Stefan Reuter" <sr...@re...> To: <ast...@li...> Sent: Tuesday, February 28, 2006 3:59 PM Subject: Re: [Asterisk-java-devel] AstManProxy Christian, it doesnt sound like lots of changes would be needed to make Asterisk-Java and AstManProxy work together nicely. I would like to completely hide the existence of a proxy from Asterisk-Java's users and make Asterisk-Java deal with the small differences under the hood. Support for the challenge-response authentication could probably be added to AstManProxy quite easily. What is Proxy-Key used for? Do we need support for it in Asterisk-Java? If you indent to provide patches for Asterisk-Java be sure to create them against the latest version available via svn from http://svn.reucon.net/repos/asterisk-java/trunk =Stefan Cristian Talle wrote: > 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(...)? > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel -- reuter network consulting Neusser Str. 110 50760 Köln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... Jabber: sr...@ja... |