Re: [Asterisk-java-devel] AstManProxy
Brought to you by:
srt
From: Stefan R. <sr...@re...> - 2006-02-28 20:59:30
|
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 =3DStefan 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-specif= ic > extensions to the Asterisk Manager protocol but it doesn't interfere wi= th > the rest of the data being passed through, other than changing the prot= ocol > string :). >=20 > The only two problems I had to deal with (aside from the protocol strin= g) > were: >=20 > 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. >=20 > (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. >=20 > I can see the value of a proxy when you have to allow multiple connecti= ons > 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 t= o > 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. >=20 > 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 :) >=20 > Thanks, > Cristian >=20 > ----- Original Message -----=20 > From: "Stefan Reuter" <sr...@re...> > To: <ast...@li...> > Sent: Tuesday, February 28, 2006 1:53 PM > Subject: Re: [Asterisk-java-devel] AstManProxy >=20 > Hi Christian, >=20 > I think the best solution would be to just add support for the "Asteris= k > 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? >=20 > =3DStefan >=20 > Cristian Talle wrote: >=20 >>Hi, >> >>I tried to use the asterisk-java api to connect to Asterisk Manager via= >=20 > AstManProxy and it didn't work. The code appears to deal only with "Ast= erisk > Call Manager" v. "1.0". AstManProxy is (currently)substituting the prod= uct > version string with "Asterisk Manager Proxy/1.12". >=20 >>I implemented some changes myself - just enough to get it working :) an= d I >=20 > was wondering: would it not be a good idea to pass the expected manager= > interface name / version parameters to the > ManagerConnectionFactory.getConnection(...)? >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting lang= uage > that extends applications into web and mobile media. Attend the live we= bcast > and join the prime developer group breaking into this new coding territ= ory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel --=20 reuter network consulting Neusser Str. 110 50760 K=F6ln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... Jabber: sr...@ja... |