Re: [Asterisk-java-users] Gnudialer and asterisk-java, new event types
Brought to you by:
srt
From: Stefan R. <ste...@re...> - 2008-04-06 09:57:51
|
Thanks for reporting your success. You can register the event even before logging in, so you receive the events right from the beginning, e.g. connection.registerUserEventClass(CRM_DispoRecordEvent.class); connection.login(); =Stefan Maciek Tokarski wrote: > Hi, > Stefan thanks for the advice. I've implemented a CRM_DispoRecord and > registered it. And now I'm able to handle this event. > > I've done this in this way: > > --- CRM_DispoRecordEvent.java file > > public class CRM_DispoRecordEvent extends ManagerEvent{ > /** > * class body definition > */ > } > > > --- Main application file > > //.... > connection = factory.createManagerConnection(); > > try { > connection.login(); > connection.registerUserEventClass(CRM_DispoRecordEvent.class); > } catch (Exception ex) { > ex.printStackTrace(); > } > //.... > > Most important thing was to extend ManagerEvent not UserEvent class in > CRM_DispoRecordEvent. > > > Regards, Maciek > > > > -----Original Message----- > From: ast...@li... > [mailto:ast...@li...] On Behalf Of > Stefan Reuter > Sent: Sunday, April 06, 2008 10:24 AM > To: ast...@li... > Subject: Re: [Asterisk-java-users] Gnudialer and asterisk-java, new event > types > > Hi, > > though the registerUserEvent method in ManagerConnection is intended > primarily for user events you can also use it to register "normal" > events. The approach is to implement a class for the CRM_DispoRecord > event and register it. Just have a look at the other events to see how > to do that. > There is no need to recompile or modify the Asterisk-Java jar to add new > events. > > =Stefan > -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |