问题
I am trying to connect from a .NET application to the Asterisk server, but the connection is not established. I am using the following code to connect to 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);
and I get the following error:
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
Can someone tell me what am I doing wrong or what is the solution to this?
Regards, Tamash
回答1:
Check AMI in manager.conf. It should be like this:
enabled = yes
port = 5038
bindaddr = 0.0.0.0
来源:https://stackoverflow.com/questions/13837136/connecting-from-net-to-asterisk