我正在尝试从.NET应用程序连接到Asterisk服务器,但未建立连接。我使用以下代码连接到Asterisk:
Socket clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
IPEndPoint serverEndPoint = new IPEndPoint(IPAddress.Parse("192.168.0.35"), 5038);
clientSocket.Connect(serverEndPoint);
我收到以下错误:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.0.35:5038
有人能告诉我我做错了什么或者解决方法是什么?
此致 Tamash
答案 0 :(得分:0)
在manager.conf中检查AMI。它应该是这样的:
enabled = yes
port = 5038
bindaddr = 0.0.0.0