Help - Search - Members - Calendar
Full Version: How I know if skype is ready to call?
Skype Community > English > Development, Betas and Skype Garage > Skype Public API
Felipe Fujiy Pessoto
What is better? I am writing

cSkype.ActiveCalls.Count == 0

Its the best way? I having problem, because sometimes 2 people can fire the call button on website together and Count is 0 for both, but when get PlaceCall, just one can make the call, and another get a error.

Another question, when i can Finish a call? Sometimes throw a exception when a try to finish:

if (cl != null && cl.Status != TCallStatus.clsFinished && cl.Status != TCallStatus.clsCancelled)
cl.Finish();
TheUberOverlord
QUOTE (Felipe Fujiy Pessoto @ Tue Jul 1 2008, 06:34)
Go to the original post
What is better? I am writing

cSkype.ActiveCalls.Count == 0

Its the best way? I having problem, because sometimes 2 people can fire the call button on website together and Count is 0 for both, but when get PlaceCall, just one can make the call, and another get a error.

Another question, when i can Finish a call? Sometimes throw a exception when a try to finish:

if (cl != null && cl.Status != TCallStatus.clsFinished && cl.Status != TCallStatus.clsCancelled)
cl.Finish();


Please read me last message about this.

What do the Exception.Message and Exception.Source contain?

CODE
try
{
if (cl != null && cl.Status != TCallStatus.clsFinished && cl.Status != TCallStatus.clsCancelled)
                        cl.Finish();

}
catch( Exception e)
{
MessageBox.Show("Exception Source: " + e.Source + " - Exception Message: " + e.Message);
}


I would do

CODE
if (cSkype.ActiveCalls.Count == 0)
{
     PlaceCall......
}
else
{
queue call
}
Felipe Fujiy Pessoto
Problem 1-) ex.Message: " CALL: Action failed"
ex.Source: "Skype4COM.Skype.1"

When call finish, but Status is Failed per example

Problem 2-) The problem with this is that when 2 people click together, and "cSkype.ActiveCalls.Count == 0" is processed together, placeCall will call twice. But i resolve this using lock
TheUberOverlord
QUOTE (Felipe Fujiy Pessoto @ Tue Jul 1 2008, 08:58)
Go to the original post
Problem 1-) ex.Message: " CALL: Action failed"
ex.Source: "Skype4COM.Skype.1"

When call finish, but Status is Failed per example

Problem 2-) The problem with this is that when 2 people click together, and "cSkype.ActiveCalls.Count == 0" is processed together, placeCall will call twice. But i resolve this using lock


Without looking at the code it could be many things.

The call could be NOT in progress, so you can't finish a call that has ended already or other things, you need to set a breakpoint and look at the call structure when this happens.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.