Re: [Asterisk-java-users] Manager API logged off automatically
Brought to you by:
srt
From: Peter H. <pe...@li...> - 2005-07-16 20:27:04
|
Stefan, You're right - it was a firewall setting. I'm confident that the PingThread solution will solve my problem... that was my next option after checking if I was missing some configuration setting. The PingThread should also help avoid the 2nd problem, because the manager should try to reconnect if it's disconnected, I'm guessing, but it would be nice if the manager could catch that loss of connection as well, in case of network outtages (or something). Aside from this issue, asterisk-java is great - thanks. Peter ----- Original Message ----- From: "Stefan Reuter" <sr...@re...> To: <ast...@li...> Sent: Saturday, July 16, 2005 12:43 PM Subject: Re: [Asterisk-java-users] Manager API logged off automatically > 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. Thats fine, same here :) > 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 only difference to my setup might be that I have constant traffic on my ManagerConnection due to SIP and IAX peer, registry, whatever events. That doesn't seem to be the case with you as there is no activity in log between 2005-07-16 09:21:33,828 and 2005-07-16 09:31:04,062. Maybe there is some kind of networking device between you and the Asterisk server (a firewall?) that kills the connection. What you can do is to send PingActions to Asterisk to generate this traffic. I attached an example of such a PingThread that might be useful for you. Use it as follows: c = new ManagerConnectionFactory().getManagerConnection(...); c.login(); PingThread pingThread = new PingThread(c); pingThread.start(); [...] pingThread.die(); c.logoff(); > 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. Hmmmmm lets see if the PingThread solves your problem and if not dive into this issue as well. =Stefan |