尝试从我的.NET应用程序:AsterNET.ARI > Conference Sample使用以下配置连接到Asterisk 13.4.0 on Ubuntu virtual box:
ari.conf
[general]
enabled = yes
pretty = yes
[asterisk]
type = user
read_only = no
password = asteriskextensions.conf
[default]
exten = 1000,1,Noop()
same = n,Answer()
same = n,Stasis(simpleconf,test)
same = n,Hangup()manager.conf
[general]
enabled = yes
webenabled = yes
port = 5038
bindaddr = 0.0.0.0AsterNET.ARI.SimpleConfExample
public class AppConfig
{
public const string AppName = "simpleconf";
public const string RestAddress = "http://localhost:8088/";
public const string ServerIP = "192.168.x.xx";
public const int Port = 5038;
public const string UserName = "asterisk";
public const string UserPassword = "asterisk";
public const string ConfName = "test";
}
private static void Main(string[] args)
{
try
{
// Create a message client to receive events on
Client = new AriClient(new StasisEndpoint(AppConfig.ServerIP, AppConfig.Port, AppConfig.UserName, AppConfig.UserPassword), AppConfig.AppName);
Conference.Conferences.Add(new Conference(Client, Guid.NewGuid(), AppConfig.ConferenceName));
....
}我从CLI终端获得了以下内容:
Connect attempt from '192.168.x.xxx' unable to authenticate
我做错了什么?
发布于 2015-08-20 21:03:25
Asterisk Manager界面(AMI)和Asterisk REST界面(ARI)是两种不同的界面。您的代码混合和匹配了来自两者的各种东西,特别是要连接到on - 5038的端口是AMI端口,而不是ARI端口。将您的Port声明更改为:
public const int Port = 8088;https://stackoverflow.com/questions/32067957
复制相似问题