Re: [Asterisk-java-devel] How to create a new Event.class
Brought to you by:
srt
From: Jose B. <pe...@gm...> - 2014-02-12 14:25:44
|
OK, I have sniffed AMI directly and there is not any Pickup Event sent (and I have every events permitted in manager.conf) I could checked BridgeEvent but there are many Link/Unlink messages when people presses DTMF.... Do you think is OK to check first Bridge Link event as if it were a Pickup event? On 12 February 2014 14:01, Jose Baez <pe...@gm...> wrote: > Hello! I needed a new ManagerEvent not developed in Asterisk-Java > (PickupEvent). > > I am not a developer, so I made a new class (PickupEvent.java) based on > other Asterisk-Java source code (with proper setters/getters). > > My code for handling ManagerEvent is (1.0.0-CI ) > > @Override > public void *onManagerEvent(ManagerEvent event)* { > > if (*event.getClass() == NewExtenEvent.class*) { > handleEvent((NewExtenEvent) event); > } > else if (*event.??? == PickupEvent.class)* { > handleEvent((PickupEvent) event); > } > } > > > Can I create this new class in my project without putting it in library > (which I don't know) ? > > I already made the class and: > > event.getClass() == PickupEvent.class > > ...never gets called > > What else do I need? > > Thanks. > > > |