2

我正在阅读星号明确指南,并遵循了经理指南 http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html/asterisk-book.html#AMI_id269468

这是我的 manager.conf 文件。我正在使用 Asterisk-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 论坛上问过,他们说要复制粘贴操作、用户名、秘密。试过了,但还是不行

4

1 回答 1

3

您的测试配置是合理的。您必须在秘密后按“两次”输入,否则它将超时等待输入。这是一个参考链接所有命令包都以两个回车符结束。本文适用于 Asterisk 1.6,但同样适用于更高版本。

于 2013-06-09T07:37:17.893 回答