gpt4 book ai didi

asterisk - managerAMI 未连接 :Connection closed by foregin host

转载 作者:行者123 更新时间:2023-12-04 04:54:19 25 4
gpt4 key购买 nike

我正在阅读 Asterisk 明确指南,我遵循了经理指南
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 并提供操作、用户名、 secret 后,我得到以下输出
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 秒前输入命令(操作、用户名、 secret )。我在 Asterisk 论坛上问,他们说复制粘贴操作、用户名、 secret 。尝试过但仍然无法正常工作

最佳答案

您的测试配置是合理的。您必须在 secret 之后按“两次”回车,否则等待回车时它会超时。这是引用链接All command packets are closed with two carriage returns .本文适用于 Asterisk 1.6,但同样适用于更高版本。

关于asterisk - managerAMI 未连接 :Connection closed by foregin host,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16990269/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com