Telnet to AMI

Trying the AMI for the first time:

[code]root@tleilax:~#
root@tleilax:~# cat /etc/asterisk/manager.conf
;
; Asterisk Call Management support
;

; By default asterisk will listen on localhost only.
[general]
displaysystemname = yes
enabled = yes
port = 5038
bindaddr = 127.0.0.1

[admin]
secret = password
writetimeout = 500
read = system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,config

; No access is allowed by default.
; To set a password, create a file in /etc/asterisk/manager.d
; use creative permission games to allow other serivces to create their own
; files
#include “manager.d/*.conf”

root@tleilax:~#
root@tleilax:~# telnet localhost 5038
Trying 127.0.0.1…
telnet: Unable to connect to remote host: Connection refused
root@tleilax:~#
[/code]

as per jcgonzalez.com/test-asterisk-ami-telnet

what am I doing wrong? firewall problem?

check if the port is listening
netstat -apn | grep 5038

[quote=“ambiorixg12”]check if the port is listening
netstat -apn | grep 5038[/quote]

No result. But didn’t that edit to the AMI configuration tell asterisk to listen?

Try this

[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0

and remember to reload asterisk for future reference read this

svn.digium.com/svn/asterisk/trun … onf.sample

[quote=“ambiorixg12”]Try this

[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0

and remember to reload asterisk for future reference read this

svn.digium.com/svn/asterisk/trun … onf.sample[/quote]

On the server, works:

[quote]
linux-k7qk:~ #
linux-k7qk:~ # netstat -apn | grep 5038
tcp 0 0 0.0.0.0:5038 0.0.0.0:* LISTEN 3401/asterisk
tcp 0 0 127.0.0.1:5038 127.0.0.1:27750 ESTABLISHED 3401/asterisk
tcp 0 0 127.0.0.1:5038 127.0.0.1:27910 TIME_WAIT -
tcp 0 0 127.0.0.1:27749 127.0.0.1:5038 ESTABLISHED 3992/perl
tcp 0 0 127.0.0.1:27750 127.0.0.1:5038 ESTABLISHED 3999/perl
tcp 0 0 127.0.0.1:5038 127.0.0.1:27911 TIME_WAIT -
tcp 0 0 127.0.0.1:5038 127.0.0.1:27749 ESTABLISHED 3401/asterisk
linux-k7qk:~ # [/quote]

but I’ll have to try that at home.