我正在看星号确定指南,我遵循了经理指南http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html/asterisk-book.html AMI_id269468
这是我的manager.conf文件。我用的是星号-1.8 ; Asterisk Call Management support
; By default asterisk will listen on localhost only.
[general]
enabled = yes
webenabled = yes
port = 5038
bindaddr = 127.0.0.1
[hello]
secret=world
; 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"
下面是我的日志文件。在使用sudo telnet 127.0.0.1 5038并提供操作、用户名、秘密之后,我得到以下输出
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Asterisk Call Manager/1.1
Action:Login
Username:hello
Secret:world
Connection closed by foreign host
下面是我的日志文件:
[Jun 7 22:55:44] VERBOSE[5328] config.c: == Parsing '/etc/asterisk/logger.conf': [Jun 7 22:55:44] DEBUG[5328] config.c: Parsing /etc/asterisk/logger.conf
[Jun 7 22:55:44] VERBOSE[5328] config.c: == Found
[Jun 7 22:55:44] VERBOSE[5328] logger.c: Asterisk Queue Logger restarted
[Jun 7 22:56:40] VERBOSE[5533] manager.c: == Client from 127.0.0.1, failed to authenticate in 30 seconds
[Jun 7 22:56:40] VERBOSE[5533] manager.c: == Connect attempt from '127.0.0.1' unable to authenticate
我在30秒前输入命令(动作,用户名,秘密)。我在Asterisk论坛问,他们说复制粘贴动作,用户名,秘密。
您的测试配置是合理的。你必须在secret后面按两次回车键,否则它会超时等待回车。所有的命令包都以两个回车符关闭。本文适用于Asterisk 1.6,但同样适用于后续版本。