I'm trying to call 2 persons. Not for a conference, but for speaking to them alone. So I want to have the following result:
Call 1: Me -> Person 1 (Hold)
Call 2: Me -> Person 2 (InProgress)
Or the other way round, of course. So I call the first person and it accepts the call. Then I'll call the second person, so the status of call 1 should go to Localhold and I'm able to place the second call.
I'm working with c# and Skype4COMLib. This is what I'm trying, but it doesn't work. All active calls are hold, but the new call isn't placed:
CODE
int index = lstContacts.SelectedIndices[0];
try
{
foreach (Call _call in skype.ActiveCalls)
{
_call.Hold();
while (_call.Status != TCallStatus.clsLocalHold) ;
}
skype.PlaceCall(lstContacts.Items[index].SubItems[3].Text, "", "", ""); // Get userhandle and place the call....
}
catch (COMException ex)
{
MessageBox.Show(ex.Message);
}
try
{
foreach (Call _call in skype.ActiveCalls)
{
_call.Hold();
while (_call.Status != TCallStatus.clsLocalHold) ;
}
skype.PlaceCall(lstContacts.Items[index].SubItems[3].Text, "", "", ""); // Get userhandle and place the call....
}
catch (COMException ex)
{
MessageBox.Show(ex.Message);
}
Sry for my bad English....
Thanks in advance
WR
Ok, found the solution:
CODE
foreach (Call _call in skype.ActiveCalls)
{
if (_call.Status != TCallStatus.clsLocalHold)
{
_call.Hold();
while (_call.Status != TCallStatus.clsLocalHold) ;
}
}
{
if (_call.Status != TCallStatus.clsLocalHold)
{
_call.Hold();
while (_call.Status != TCallStatus.clsLocalHold) ;
}
}