Re: [Asterisk-java-users] deciphering events
Brought to you by:
srt
From: Forte, G. \(GFORTE\) <gf...@ar...> - 2006-01-20 20:58:09
|
Nice, that makes things alot clearer! Thanks again Stefan! =20 Stefan, could you offer some advice? I want to broadcast most of the events via Ajax so I was wondering if it = was wise to: Leave HelloEvents.java as an executable without a timeout specified and = just let it run or convert it to a servlet. Basically I think I will be building a XML doc from specific events that = are generated by HelloEvents.java..... although I am new to Ajax as = well. =20 Any advice would be greatly appreciated!! Thanks again. ________________________________ From: ast...@li... on behalf of = Stefan Reuter Sent: Fri 1/20/2006 5:27 AM To: ast...@li... Subject: Re: [Asterisk-java-users] deciphering events sure, you can cast them to concrete instances and use the getters of = that event. for example: public void handleEvent(ManagerEvent event) { if (event instanceof JoinEvent) { handleJoinEvent((JoinEvent) event);=20 } } protected void handleJoinEvent(JoinEvent event) { System.out.println(event.getChannel() + " joined " + = event.getQueue()); } =3DStefan On 1/19/06, Forte, Graham (GFORTE) <gf...@ar...> wrote:=20 Hello, =20 I wanted to know if there was a way to further decipher events that are = passed from the helloEvents script. I get the following from this script: =20 = *************************************************************************= ************************************************** net.sf.asterisk.manager.event.StatusCompleteEvent: dateReceived=3DThu = Jan 19 15:11:53 CST 2006; systemHashcode=3D20989238 unique=3D20989238 net.sf.asterisk.manager.event.OriginateSuccessEvent: dateReceived=3DThu = Jan 19 15:12:19 CST 2006; privilege=3Dcall,all; = systemHashcode=3D19727353 unique=3D19727353 net.sf.asterisk.manager.event.ExtensionStatusEvent: dateReceived=3DThu = Jan 19 15:12:19 CST 2006; privilege=3Dcall,all; systemHashcode=3D6290200 unique=3D6290200 net.sf.asterisk.manager.event.NewCallerIdEvent: dateReceived=3DThu Jan = 19 15:12:20 CST 2006; privilege=3Dcall,all; systemHashcode=3D22936951 unique=3D22936951 net.sf.asterisk.manager.event.NewStateEvent: dateReceived=3DThu Jan 19 = 15:12:25 CST 2006; privilege=3Dcall,all; systemHashcode=3D28064776 unique=3D28064776 net.sf.asterisk.manager.event.MeetMeJoinEvent: dateReceived=3DThu Jan = 19 15:12:25 CST 2006; privilege=3Dcall,all; systemHashcode=3D14451727 unique=3D14451727 net.sf.asterisk.manager.event.MeetMeLeaveEvent: dateReceived=3DThu Jan = 19 15:12:41 CST 2006; privilege=3Dcall,all; systemHashcode=3D1026511 unique=3D1026511 net.sf.asterisk.manager.event.HangupEvent: dateReceived=3DThu Jan 19 = 15:12:41 CST 2006; privilege=3Dcall,all; systemHashcode=3D13271847 unique=3D13271847 = *************************************************************************= ************************************************** Is there a way to get more detail. More like a chatroom where when a person leaves or joins everyone in = the room is alerted that <newUserName> has joined. I want to do something similar to that with the conference call. =20 So that when a new caller joins or leaves the conferencees are alerted = .... JoeSchmoe SIP number 20022 has joined the conference. I guess what I am saying is can I return something other than the = systemHashcode or dateReceived etc.... An example would be greatly appreciated. =20 Thanks again Stefan!! =09 |