- Joined
- Aug 16, 2018
- Messages
- 2
- Reaction score
- 0
Hello there,
I am developing a web service with 3cx 15 api.
Makecall function works when I make a request but when there is more than one request I get the "ConfigServer is not connected error."
What is the problem?
I am developing a web service with 3cx 15 api.
Makecall function works when I make a request but when there is more than one request I get the "ConfigServer is not connected error."
What is the problem?
Code:
public bool Bootstrap(string filePath, string from , string to)
{
{
var a = new Random(Environment.TickCount);
//unique name PhoneSystem.ApplicationName = "TestApi";//any name
PhoneSystem.ApplicationName = PhoneSystem.ApplicationName + a.Next().ToString();
}
#region phone system initialization(init db server)
var value = Utilities.GetKeyValue("ConfService", "ConfPort", filePath);
var port = 0;
PhoneSystem.CfgServerHost = "127.0.0.1";
if (!string.IsNullOrEmpty(value))
{
int.TryParse(value.Trim(), out port);
PhoneSystem.CfgServerPort = port;
}
value = Utilities.GetKeyValue("ConfService", "confUser", filePath);
if (!string.IsNullOrEmpty(value))
PhoneSystem.CfgServerUser = value;
value = Utilities.GetKeyValue("ConfService", "confPass", filePath);
if (!string.IsNullOrEmpty(value))
PhoneSystem.CfgServerPassword = value;
#endregion
DN exClient = PhoneSystem.Root.GetDNByNumber(from);
if (exClient.GetActiveConnections().Length==0)
{
PhoneSystem.Root.MakeCall(from, to);
}
}