[Asterisk-java-devel] Live and getVersion() issue
Brought to you by:
srt
From: T. L. P. T. <tom...@gm...> - 2008-03-26 02:31:13
|
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. |