Re: [Asterisk-java-devel] Asterisk user event problem
Brought to you by:
srt
From: Mircea P. <mir...@ya...> - 2006-07-14 07:42:38
|
I have changed the ReplyEvent class to extend ManagerEvent (I have added the channel and uniqueId to it as they are not inherited anymore). The register I left as it was. I still get the log message: No event class registered for event type 'reply', attributes: {privilege=user,all, transactionid=1152862210.0, uniqueid=1152862282.1, event=Reply, channel=SIP/174-c026} Shall I send the event from the server with a different name? Now its "Reply". Thank you. Mircea Stefan Reuter <sr...@re...> wrote: Mircea Postolache wrote: > ManagerConnection > con=mgrConnectionFactory.getManagerConnection(); > con.login(); > //register Reply event > con.registerUserEventClass(ReplyEvent.class); > > On the server side I have added some C code into Asterisk's code for > app_voicemail.c to fire the event in a the case of a reply. > > manager_event(EVENT_FLAG_USER, "Reply", "Channel: %s\r\nUniqueid: %s\r\nTransactionId: %s\r\n", chan->name, chan->uniqueid, transactionId); The UserEvent stuff was designed to be used with the UserEvent application. Asterisk-Java registers the event with the extension "UserEvent" if your event extends UserEvent because that application adds that part. So your event wansnt registered as Reply but as ReplyUserEvent. As you are not using the UserEvent application but rather introduce your own new event you should not extend UserEvent but ManagerEvent. You should still be able to register it through con.registerUserEventClass(ReplyEvent.class) though. Does that fix your problem? =Stefan -- reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: sr...@re... Jabber: sr...@ja... --------------------------------- Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less. |