Thread: [Asterisk-java-users] OriginateCallback
Brought to you by:
srt
From: King H. <kin...@ne...> - 2006-09-15 18:47:15
|
Stefan, Is it possible to add an onRing() event handler to OriginateCallback? I am trying to start getting information ready for the agents when the phone starts ringing rather than waiting for the pickup. I think onRing() corresponds to a Newchannel event with "State: Ring" and the Uniqueid belongs to an Originated call. Thanks! King |
From: Chris H. <chr...@kn...> - 2006-09-15 21:08:59
|
On Sep 15, 2006, at 1:47 PM, King Ho wrote: > Stefan, > > Is it possible to add an onRing() event handler to > OriginateCallback? I am > trying to start getting information ready for the agents when the > phone > starts ringing rather than waiting for the pickup. > > I think onRing() corresponds to a Newchannel event with "State: > Ring" and > the Uniqueid belongs to an Originated call. Would the AgentCalled event work for you? This event fires when the agents phone rings before the agent answers. Chris |
From: King H. <kin...@ne...> - 2006-09-16 05:18:50
|
Maybe I was not clear in my last email. I want to start "doing things" = when the Originated call starts to ring (i.e., the customer phone), not the = agent phone. King -----=AD=EC=A9l=B6l=A5=F3----- =B1H=A5=F3=AA=CC: ast...@li... [mailto:ast...@li...] =A5N=B2z = Chris Howard =B1H=A5=F3=A4=E9=B4=C1: Saturday, 16 September, 2006 5:09 =A6=AC=A5=F3=AA=CC: ast...@li... =A5D=A6=AE: Re: [Asterisk-java-users] OriginateCallback On Sep 15, 2006, at 1:47 PM, King Ho wrote: > Stefan, > > Is it possible to add an onRing() event handler to =20 > OriginateCallback? I am > trying to start getting information ready for the agents when the =20 > phone > starts ringing rather than waiting for the pickup. > > I think onRing() corresponds to a Newchannel event with "State: =20 > Ring" and > the Uniqueid belongs to an Originated call. Would the AgentCalled event work for you? This event fires when the =20 agents phone rings before the agent answers. Chris -------------------------------------------------------------------------= Using Tomcat but need to do more? Need to support web services, = security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache = Geronimo http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users __________ NOD32 1.1758 (20060915) Information __________ This message was checked by NOD32 antivirus system. http://www.nod32.com.hk |
From: <ap...@op...> - 2006-09-16 05:25:32
|
I guess that you can parse NewExtenEvent or NewStateEvent or NewChannelEvent, I'm not sure which one, but in one of them you can find = a "Ring" state. > Maybe I was not clear in my last email. I want to start "doing things" > when > the Originated call starts to ring (i.e., the customer phone), not the > agent > phone. > > King --=20 Atte. =C3=81lvaro Palma |
From: King H. <kin...@ne...> - 2006-09-16 05:45:51
|
Palma, I know that as stated in my original email about which event corresponds = to this onRing().=20 I just think that it would be better if the OriginateCallback would also = handle this event within a single callback rather than having the event = handling code distributed in 2 places. King -----=E5=8E=9F=E5=A7=8B=E9=83=B5=E4=BB=B6----- =E5=AF=84=E4=BB=B6=E8=80=85: = ast...@li... = [mailto:ast...@li...] = =E4=BB=A3=E7=90=86 =C3=A1lvaro Palma =E5=AF=84=E4=BB=B6=E6=97=A5=E6=9C=9F: Saturday, 16 September, 2006 13:25 =E6=94=B6=E4=BB=B6=E8=80=85: ast...@li... =E4=B8=BB=E6=97=A8: Re: [Asterisk-java-users] OriginateCallback I guess that you can parse NewExtenEvent or NewStateEvent or NewChannelEvent, I'm not sure which one, but in one of them you can find = a "Ring" state. > Maybe I was not clear in my last email. I want to start "doing things" > when > the Originated call starts to ring (i.e., the customer phone), not the > agent > phone. > > King --=20 Atte. =C3=81lvaro Palma -------------------------------------------------------------------------= Using Tomcat but need to do more? Need to support web services, = security? Get stuff done quickly with pre-integrated technology to make your job = easier Download IBM WebSphere Application Server v.1.0.1 based on Apache = Geronimo http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |
From: Stefan R. <sr...@re...> - 2006-09-16 11:41:24
Attachments:
signature.asc
|
You can add a PropertyChangeListener to monitor any changes on the originated channel. Example: public void onDialing(AsteriskChannel channel) { channel.addPropertyChangeListener( AsteriskChannel.PROPERTY_STATE, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { System.out.println("New State: " + evt.getNewValue()); } }); } =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... |
From: King H. <kin...@ne...> - 2006-09-16 14:12:49
|
Stefan, This will do what I want and actually this is more flexible than what I proposed. However, I think having onRing() will look cleaner :) Thanks! King -----=AD=EC=A9l=B6l=A5=F3----- =B1H=A5=F3=AA=CC: ast...@li... [mailto:ast...@li...] =A5N=B2z = Stefan Reuter =B1H=A5=F3=A4=E9=B4=C1: Saturday, 16 September, 2006 19:41 =A6=AC=A5=F3=AA=CC: ast...@li... =A5D=A6=AE: Re: [Asterisk-java-users] OriginateCallback You can add a PropertyChangeListener to monitor any changes on the originated channel. Example: public void onDialing(AsteriskChannel channel) { channel.addPropertyChangeListener( AsteriskChannel.PROPERTY_STATE, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { System.out.println("New State: " + evt.getNewValue()); } }); } =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... |