1
votes

I am trying to catch some log of events in asterisk manager (AMI) with command telnet 0.0.0.0 5038, like in the image below, but nothing appears.

[root@localhost vagrant]# telnet 0.0.0.0 5038
Trying 0.0.0.0...
Connected to 0.0.0.0.
Escape character is '^]'.
Asterisk Call Manager/1.3


In Asterisk CLI the connection of manager appears (image below).


    [root@localhost vagrant]# asterisk -vvvvvvvvvvvvvvvvr
    Asterisk 11.11.0, Copyright (C) 1999 - 2013 Digium, Inc. and others.
    Created by Mark Spencer 
    Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
    This is free software, with components licensed under the GNU General Public
    License version 2 and other licenses; you are welcome to redistribute it under
    certain conditions. Type 'core show license' for details.
    =========================================================================
    Connected to Asterisk 11.11.0 currently running on localhost (pid = 3896)
    localhost*CLI> 
      == Manager 'teste' logged on from 192.168.56.101
      == Manager 'teste' logged on from 192.168.56.101
      == Manager 'teste' logged off from 192.168.56.101
      == Manager 'teste' logged off from 192.168.56.101

My netstat:

  

    tcp        0      0 0.0.0.0:5038                0.0.0.0:*                   OUÇA       3896/asterisk  

Using:

  • CentOS release 6.6
  • Asterisk 11.11
  • This is manager.conf:
         [general]
        enabled=yes
        webenabled=yes
        port=5038
        bindaddr=0.0.0.0
        debug=on
        authlimit=500000
    
        [teste]
        secret=test123
        read=all,system,call,log,verbose,command,agent,user,config
        write=all,system,call,log,verbose,command,agent,user,config
        writetimeout=9999
        displayconnects=yes
        
2

2 Answers

1
votes

My foult :/ I just forget to do the login into telnet.

Type into telnet:

action:login
username:teste
secret:teste123

...and good to go. :)

0
votes
telnet 127.0.0.1 5038

Here, telnet : command for telnet application 127.0.0.1 : host for the asterisk 5038 : default ami port Then you can see the ami commandline interface and version of asterisk installed..

Type the following to login to you ami manager session

Action: login
Username:amiuname
Password: amilwd

Here amiuname and amipwd were sey in the manager.conf