Re: [Asterisk-java-users] How to get ORIGINATE_STATUS value after OriginateAction
Brought to you by:
srt
From: roko <ro...@ya...> - 2013-03-06 03:57:20
|
Hi I use the SendActionCallback, but I'm getting the same response that I get from the blocking function... no new data. So, how can I get the value of the ORIGINATE_STATUS variable ? E. ________________________________ De: roko <ro...@ya...> Para: "ast...@li..." <ast...@li...> Enviado: Lunes, 4 de marzo, 2013 10:38 A.M. Asunto: Re: [Asterisk-java-users] How to get ORIGINATE_STATUS value after OriginateAction Hi Thx for your answer. Do you mean instead of blocking using: ManagerResponse sendAction(ManagerAction action, long timeout) Should I use this function ?: void sendAction(ManagerAction action, SendActionCallback callback) I see in the docs that I still get a ManagerResponse. Pls forgive me, I'm very new at this. How can I get the ORIGINATE_STATUS from the ManagerResponse object ? Do you have an example that I could use ? Thx for your help. E. ________________________________ De: Yves A. <yv...@gm...> Para: ast...@li... Enviado: Lunes, 4 de marzo, 2013 2:45 A.M. Asunto: Re: [Asterisk-java-users] How to get ORIGINATE_STATUS value after OriginateAction Hi, you could use a callback handler. this way you´ll get informed about any state change. yves Am 04.03.2013 04:06, schrieb roko: Hi everyone > > >I'm just starting with asterisk and asterisk-java, so please forgive me if this is a silly question. Here (http://www.voip-info.org/wiki/view/Asterisk+cmd+Originate) I can see that the originate cmd sets the ORIGINATE_STATUS variable before exiting. How can I get this value from asterisk-java ? At this point I'm using the code from the tutorial, like this: >OriginateAction originateAction; ManagerResponse originateResponse; originateAction = new OriginateAction(); originateAction.setChannel("SIP/John"); originateAction.setContext("default"); originateAction.setExten("1300"); originateAction.setPriority(new Integer(1)); originateAction.setTimeout(new Integer(30000)); managerConnection.login(); originateResponse = managerConnection.sendAction(originateAction, 30000); >Thx for your help. > > > E. > > > >------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb > > >_______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ Asterisk-java-users mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |