- Joined
- Feb 26, 2018
- Messages
- 99
- Reaction score
- 10
Hi,
I have got a outbound dialer project when my dialer call someone i want to check if its succesful or not. I have got external script component at my project that running getCallState() method for getting connection state and return it. Its working good when i run this method at Visual Studio environment returning me ConnectionStatus but when i run this method at CFD side its returning empty string that initial value of my state property.
Could someone tell me whats the problem?
I have got a outbound dialer project when my dialer call someone i want to check if its succesful or not. I have got external script component at my project that running getCallState() method for getting connection state and return it. Its working good when i run this method at Visual Studio environment returning me ConnectionStatus but when i run this method at CFD side its returning empty string that initial value of my state property.
Could someone tell me whats the problem?
Code:
public string getCallState(string number)
{
string state = "";
if (PhoneSystem.Root.GetActiveConnectionsByCallID().Count > 0)
{
foreach (var item in PhoneSystem.Root.GetActiveConnectionsByCallID())
{
for (int i = 0; i < item.Value.Count; i++)
{
if (item.Value[i].DialedNumber == number)
{
if (item.Value[i].Status == ConnectionStatus.Ringing)
{
state= "ringing";
}
else if (item.Value[i].Status == ConnectionStatus.Connected)
{
state= "connected";
}
else if (item.Value[i].Status == ConnectionStatus.Dialing)
{
state= "dialing";
}
else
{
state= "";
}
}
}
}
}
return state;
}