Thread: [Asterisk-java-users] deciphering events
Brought to you by:
srt
From: Forte, G. \(GFORTE\) <gf...@ar...> - 2006-01-19 21:24:00
|
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!! |
From: Brett S. <bs...@no...> - 2006-01-19 21:27:16
|
It would be really nice if the toString() methods for each event type was overloaded to print a more meaningful message out. This would help with debugging considerably. Forte, Graham (GFORTE) wrote: > Hello, > > 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: > > *************************************************************************************************************************** > net.sf.asterisk.manager.event.StatusCompleteEvent: dateReceived=Thu > Jan 19 15:11:53 CST 2006; systemHashcode=20989238 > unique=20989238 > net.sf.asterisk.manager.event.OriginateSuccessEvent: dateReceived=Thu > Jan 19 15:12:19 CST 2006; privilege=call,all; systemHashcode=19727353 > unique=19727353 > net.sf.asterisk.manager.event.ExtensionStatusEvent: dateReceived=Thu > Jan 19 15:12:19 CST 2006; privilege=call,all; systemHashcode=6290200 > unique=6290200 > net.sf.asterisk.manager.event.NewCallerIdEvent: dateReceived=Thu Jan > 19 15:12:20 CST 2006; privilege=call,all; systemHashcode=22936951 > unique=22936951 > net.sf.asterisk.manager.event.NewStateEvent: dateReceived=Thu Jan 19 > 15:12:25 CST 2006; privilege=call,all; systemHashcode=28064776 > unique=28064776 > net.sf.asterisk.manager.event.MeetMeJoinEvent: dateReceived=Thu Jan 19 > 15:12:25 CST 2006; privilege=call,all; systemHashcode=14451727 > unique=14451727 > net.sf.asterisk.manager.event.MeetMeLeaveEvent: dateReceived=Thu Jan > 19 15:12:41 CST 2006; privilege=call,all; systemHashcode=1026511 > unique=1026511 > net.sf.asterisk.manager.event.HangupEvent: dateReceived=Thu Jan 19 > 15:12:41 CST 2006; privilege=call,all; systemHashcode=13271847 > unique=13271847 > *************************************************************************************************************************** > 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. > > 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. > > Thanks again Stefan!! |
From: Stefan R. <ste...@gm...> - 2006-01-20 10:21:05
|
Brett, you are right. Instead of overriding the toString() methods i would like to use a reflection based approach. Please create an enhancement request for this issue on http://jira.reucon.org =3DStefan On 1/19/06, Brett Sutton <bs...@no...> wrote: > > It would be really nice if the toString() methods for each event type was > overloaded to print a more meaningful message out. > This would help with debugging considerably. > > > > Forte, Graham (GFORTE) wrote: > > Hello, > > 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: > > > *************************************************************************= ************************************************** > 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 J= an > 19 15:12:19 CST 2006; privilege=3Dcall,all; systemHashcode=3D19727353 > unique=3D19727353 > net.sf.asterisk.manager.event.ExtensionStatusEvent: dateReceived=3DThu Ja= n > 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. > > 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. > > Thanks again Stefan!! > > > |
From: Stefan R. <ste...@gm...> - 2006-01-20 10:27:15
|
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); } } protected void handleJoinEvent(JoinEvent event) { System.out.println(event.getChannel() + " joined " + event.getQueue ()); } =3DStefan On 1/19/06, Forte, Graham (GFORTE) <gf...@ar...> wrote: > > Hello, > > 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: > > > *************************************************************************= ************************************************** > 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 J= an > 19 15:12:19 CST 2006; privilege=3Dcall,all; systemHashcode=3D19727353 > unique=3D19727353 > net.sf.asterisk.manager.event.ExtensionStatusEvent: dateReceived=3DThu Ja= n > 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. > > 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. > > Thanks again Stefan!! > |