Skip to content

Asterisk test connection to AMI by telnet

AMI is enabled in asterisk manager.conf

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

[admin]
secret = secret
--- skipped ---

Check from asterisk console

myaster*CLI> manager show settings 

Global Settings:
----------------
  Manager (AMI):             Yes            
  Web Manager (AMI/HTTP):    No            
  TCP Bindaddress:           127.0.0.1:5038 
  HTTP Timeout (seconds):    60             
--- skipped ---

Connect by telnet

$ telnet localhost 5038
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Asterisk Call Manager/2.10.5

Input

Action: Login
ActionID: 1
Username: admin
Secret: secret

Press ENTER twice!

Valid result is

Response: Success
ActionID: 1
Message: Authentication accepted