I am using the Skype API for video calling. Now I have a button to end the call. I wrote the following code on button’s click:
if (skype.ActiveCalls.Count > 0)
{
skype.ActiveCalls[0].Finish();
//conference calls
//for (int i = 0; i < skype.ActiveCalls.Count; i++)
//{
//if (skype.ActiveCalls[i + 1].ConferenceId > 0)
//{
//skype.ActiveCalls[i + 1].Finish();
//call = skype.;
//}
//}
}
but it is throwing exception:
Value does not fall within the expected range.
How to end an active call?
Well my guess from the commented code
is that the ActiveCalls arrays is not zero based, and starts from 1,
so you should change
skype.ActiveCalls[0].Finish();to
Juat a guess