Hi,
I just downloaded asterisk-java 0.2 and went through the HeloWorld
tutorials without hassle. I was playing around with the manager
interface, and ran into an issue with a couple of the event classes. I
am using sun's java 1.5 (same results with 1.4.2) and asterisk 1.2.4.
Changing the HelloEvent to do:
managerConnection.sendAction(new SIPPeersAction());
(I also added some code to print our the IP and port from the
PeerEntryEvent)
results in:
SEVERE: Unable to convert value '5060' of property 'ipport' on class
net.sf.asterisk.manager.event.PeerEntryEvent to required type int
java.lang.NoSuchMethodException: int.<init>(java.lang.String)
at java.lang.Class.getConstructor0(Class.java:1937)
at java.lang.Class.getConstructor(Class.java:1027)
at
net.sf.asterisk.manager.impl.EventBuilderImpl.setAttributes(EventBuilderImpl.java:368)
at
net.sf.asterisk.manager.impl.EventBuilderImpl.buildEvent(EventBuilderImpl.java:288)
at
net.sf.asterisk.manager.impl.ManagerReaderImpl.buildEvent(ManagerReaderImpl.java:309)
at
net.sf.asterisk.manager.impl.ManagerReaderImpl.run(ManagerReaderImpl.java:233)
at java.lang.Thread.run(Thread.java:534)
Got Event: net.sf.asterisk.manager.event.PeerEntryEvent:
dateReceived=Sun Mar 19 18:14:30 GMT-07:00 2006; systemHashcode=3317565
IP: 10.0.23.40 Port: 0
Is this something I am doing wrong in my code, or a problem with the
framework? I also ran into a "no setter for the dnd field" when
performing the ZapShowChannelsAction.
Cam
|