Re: [Asterisk-java-devel] Live and getVersion() issue
Brought to you by:
srt
From: T. L. P. T. <tom...@gm...> - 2008-03-31 13:38:56
|
Stefan: I was busy the last days, but I made some tests with this patch on my lab environment. I think that I will have a patch ready in the next days. Thanks for your interest. Best regards, Tomás. On Mon, Mar 31, 2008 at 12:30 AM, Stefan Reuter <ste...@re...> wrote: > Tomás, > > did it work? Any help required? > > =Stefan > > > > Tomás Laureano Peralta Tormey wrote: > > Stefan: > > Thank you for your quick and productive answer. I'm starting with > > Java and I have the feeling that modifying the interface to add a new > > method wasn't a good practice. > > I will provide the patch as soon as I can get it tested. > > > > Thank you again. > > > > Best regards, Tomás. > > > > On 3/26/08, Stefan Reuter <ste...@re...> wrote: > >> Hi Thomas, > >> > >> We could add a getVersion() method to ManagerConnection that is public > >> and returns an AsteriskVersion object. > >> Feel free to provide a patch for that and update the implementation of > >> AsteriskServer to work properly with 1.6. Open an issue in Jira and > >> attach the patch and I'll integrate it. > >> > >> Thanks for your support, > >> > >> Stefan > >> > >> Tomás Laureano Peralta Tormey wrote: > >>> Hello: > >>> I'm developing some simple applications using Asterisk-Java and I > >>> came across with an issue while using the Live API. > >>> One of the methods of the AsteriskServer interface is getVersion(). > >>> This method has two signatures and if it's called without arguments, > >>> the method should return a String object with the version informed by > >>> Asterisk when a "show version" command is executed through a > >>> CommandAction. The string that's used along with the CommandAction > >>> object as a parameter of the constructor is "show version". This > >>> String is defined as a constant (private static final) at > >>> org.asteriskjava.live.internal.AsteriskServerImpl. > >>> This CLI command is valid for versions of Asterisk older than 1.6, > >>> but the next release of Asterisk will have the definition of this > >>> command deprecated; being necessary to use "core show version" > >>> instead. > >>> > >>> I tried to make a patch to solve this issue. My first approach was to > >>> determine the Asterisk version using the AsteriskVersion object > >>> defined at any ManagerConnection object, to execute the method > >>> isAtLeast(); and then use the correct show version command. But this > >>> field is protected and I can't access it from the AsteriskServer > >>> object. > >>> > >>> Should I fill a report in the JIRA bug tracker? Is there any way to > >>> access this object (AsteriskVersion) without modifying the interface > >>> of the ManagerConnection object? I still want to provide a patch :-) > >>> > >>> Thanks in advance. > >>> > >>> Best regards, Tomás. > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel > > |