Re: [Asterisk-java-users] Manager API logged off automatically
Brought to you by:
srt
From: Peter H. <pe...@li...> - 2005-07-16 17:18:47
|
Stefan, Thanks for the response.. Before I continue, I should mention that I'm using the 0.10 release and asterisk 1.0.9 - in case that throws up any flags. Also, I am running the manager API from a remote machine at the moment. The Manager API gets logged off in under 10 minutes. It seems to be pretty consistent at 7 minutes, but I can't get an exact snapshot of the time. The manager API doesn't seem to get notified that it is logged off. This is what is seen on the asterisk server side using the option -vvvc: == Parsing '/etc/asterisk/manager.conf': Found == Manager 'pdc' logged on from xx.xx.xx.xx == Manager 'pdc' logged off from xx.xx.xx.xx This is my log on the manager side. 2005-07-16 09:21:13,546 net.sf.asterisk.manager.DefaultManagerConnection INFO - Connecting to yy.yy.yy.yy port 5038 net.sf.asterisk.manager.event.ConnectEvent: dateReceived=Sat Jul 16 09:21:33 PDT 2005; systemHashcode=24670264 2005-07-16 09:21:33,484 net.sf.asterisk.manager.DefaultManagerConnection INFO - Connected via Asterisk Call Manager/1.0 2005-07-16 09:21:33,828 net.sf.asterisk.manager.DefaultManagerConnection INFO - Successfully logged in I've set the logging level to DEBUG, but nothing interesting came up. As I mentioned, it doesn't seem to know that it's gotten logged off. I'm using really basic java code to establish the connection: ManagerConnectionFactory factory = new ManagerConnectionFactory(); ManagerConnection managerConnection = factory.getManagerConnection("yy.yy.yy.yy", "username", "secret"); ManagerConnection managerConnection.login(); // Do nothing and wait On the same topic, there is another issue that presents itself when the manager is in this state. When I send a subsequent action, the Manager will reconnect, but the action will always timeout. I've set the timeout value on the action to an arbitrarily high amount. However, the action will always time out when sent in this state. 2005-07-16 09:58:09,453 net.sf.asterisk.manager.impl.ManagerReaderImpl INFO - IOException while reading from asterisk server, terminating reader thread: Connect 2005-07-16 09:58:09,453 net.sf.asterisk.manager.DefaultManagerConnection INFO - Closing socket. 2005-07-16 09:58:09,515 net.sf.asterisk.manager.DefaultManagerConnection INFO - Connecting to 63.198.100.59 port 5038 2005-07-16 09:58:29,062 net.sf.asterisk.manager.DefaultManagerConnection INFO - Connected via Asterisk Call Manager/1.0 2005-07-16 09:58:29,265 net.sf.asterisk.manager.DefaultManagerConnection INFO - Successfully logged in 2005-07-16 09:58:29,265 net.sf.asterisk.manager.DefaultManagerConnection INFO - Successfully reconnected. Exception in thread "main" net.sf.asterisk.manager.TimeoutException: Timeout waiting for response to Originate at net.sf.asterisk.manager.DefaultManagerConnection.sendAction(DefaultManagerConnection.java:421) at net.pdc.asterisk.Test.run(Test.java:93) at net.pdc.asterisk.Test.main(Test.java:200) I've attached the entire log file. Peter |