Re: [Asterisk-java-users] Problem with MonitorAction
Brought to you by:
srt
From: Alessio T. <al...@cr...> - 2014-09-29 07:37:04
|
Hi, i'm using asterisk-java version 1.0.0.CI-20140922.214529-1739 and Asterisk v. 10.12.3- This is the portion of code : 1 private void startRegister(NewStateEvent nse) { 2 AsteriskChannel ac = Bottinatrice.getChannel(nse.getUniqueId()); 3 Log.debug("Celle.startRegister :" + Config.getConfig().get(PATHREG) + " " + nse.getUniqueId()); 4 try { 5 ac.startMonitoring(Config.getConfig().get(PATHREG) + nse.getUniqueId(), "wav", true); 6 } catch (org.asteriskjava.live.ManagerCommunicationException exc) { 7 try { 8 Thread.sleep(TIMEOUTSTART); 9 } catch (InterruptedException ex) { 10 Log.error("Celle.startRegister :" + ex, ex); 11 } finally { 12 if (!checkRegister(nse)) { 13 // invia errore 14 Log.error("Celle.startRegister:"+nse); 15 } 16 removeRegister(nse); 17 } 18 } 19 } At line 5 i use startMonitorig, this method is blocked imperative execution of the code, when the asterisk finished call recording, java throw the exception org.asteriskjava.manager.TimeoutException: Timeout waiting. Below the details of the exception. Thanks Ale Il 27/09/2014 18.50, Yves A. ha scritto: > Hi Alessio, > > under normal circumstances this actions makes no problems. > Please show us your sourcecode and tell us about the asterisk and > asterisk-java version you are using. > > regards, > yves > > Am 26.09.2014 um 09:22 schrieb Alessio Turini: >> Dears, >> excuse me for my English but i'm a italian programmer that use >> Asterisk Java Library. >> >> I've a problem with the library (suppose), i'm using command >> startMonitorig in AsteriskChannel Class to record a call, but the system >> return >> >> org.asteriskjava.live.ManagerCommunicationException: Unable to send >> MonitorAction >> at >> org.asteriskjava.live.internal.ManagerCommunicationExceptionMapper.mapSendActionException(ManagerCommunicationExceptionMapper.java:60) >> at >> org.asteriskjava.live.internal.AsteriskServerImpl.sendAction(AsteriskServerImpl.java:854) >> at >> org.asteriskjava.live.internal.AsteriskChannelImpl.startMonitoring(AsteriskChannelImpl.java:748) >> ... my code .... >> at >> org.asteriskjava.manager.internal.ManagerConnectionImpl.fireEvent(ManagerConnectionImpl.java:1290) >> at >> org.asteriskjava.manager.internal.ManagerConnectionImpl.dispatchEvent(ManagerConnectionImpl.java:1274) >> at >> org.asteriskjava.manager.internal.ManagerReaderImpl.run(ManagerReaderImpl.java:227) >> at java.lang.Thread.run(Thread.java:722) >> at java.lang.Thread.run(Thread.java:722) >> Caused by: org.asteriskjava.manager.TimeoutException: Timeout waiting >> for response to Monitor >> at >> org.asteriskjava.manager.internal.ManagerConnectionImpl.sendAction(ManagerConnectionImpl.java:861) >> at >> org.asteriskjava.manager.internal.ManagerConnectionImpl.sendAction(ManagerConnectionImpl.java:817) >> at >> org.asteriskjava.manager.DefaultManagerConnection.sendAction(DefaultManagerConnection.java:311) >> at >> org.asteriskjava.live.internal.AsteriskServerImpl.sendAction(AsteriskServerImpl.java:850) >> >> >> I look the code in class ManagerConnectionImpl at line 859 there is the >> code : >> >> // still no response? >> if (result.getResponse() == null) >> { >> throw new TimeoutException("Timeout waiting for response to >> " + action.getAction() >> + (action.getActionId() == null ? "" : " (actionId: >> " + action.getActionId() + ")")); >> } >> >> return result.getResponse(); >> >> Is correct that MonitorAction hasn't response ? i tryed to view internal >> code about ResponseHandlerResult and DefaultSendActionCallback but i >> don't understand how the MonitorAction manage the response. >> Could you help me about this ? >> Thanks and Regards >> Alessio >> >> >> ------------------------------------------------------------------------------ >> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer >> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports >> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper >> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer >> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk >> _______________________________________________ >> Asterisk-java-users mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >> > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users |