Re: [Asterisk-java-users] Newbie to asterisk-java, connecting to asterisk manager exception
Brought to you by:
srt
From: Jan E. <jan...@pl...> - 2005-10-13 05:55:04
|
On Wednesday 05 October 2005 17:07, Stefan Reuter wrote: > Hi Christopher, > > > There is no firewall set, asterisk is running and the manager is enabled > > as > > per the instructions. I get this from the stack trace though........ > > > > at > > java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at > > java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at > > java.net.Socket.connect(Socket.java:452) > > hmm you did not include the exception message, that makes things a little > bit harder... I suppose what you got was a "Connection refused" exception > that means you supplied a wrong hostname/ip address or port or the > Asterisk server does not listen on the manager port (or there _is_ a > firewall ;). > Make sure your asterisk is configured properly (and restarted afterwards) > and test the connection from the machine running Asterisk-Java via telnet > (port 5038). Also make sure Asterisk allows connects to the AMI from your system. On our 1.09 the file to check is /etc/asterisk/manager.conf and the setting "permit" and "deny" in [admin]. I wondered a while why I got "Connection refused" until I understood to check and change that setting (the default seems to be to only allow 127.0.0.1 to connect). -- Jan Ekholm jan...@pl... |