Re: [Asterisk-java-devel] Asterisk user event problem
Brought to you by:
srt
From: Stefan R. <sr...@re...> - 2006-07-14 06:46:16
|
Mircea Postolache wrote: > ManagerConnection > con=3DmgrConnectionFactory.getManagerConnection(); > con.login(); > //register Reply event > con.registerUserEventClass(ReplyEvent.class); >=20 > 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. >=20 > 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? =3DStefan --=20 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... |