Re: [Asterisk-java-users] Gnudialer and asterisk-java, new event types
Brought to you by:
srt
From: Maciek T. <mlo...@gm...> - 2008-04-06 09:44:51
|
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 |