I downloaded the skype 2.5.0.141 and using "SKYPE4COMLib" in c# with windows 2000 as operating system.
My goal is to place a call programatically.
I tried using the following code
-------------------------------------------------------------------------------------
public SKYPE4COMLib.SkypeClass objSkype = new SKYPE4COMLib.SkypeClass();
SKYPE4COMLib.Call pCall = objSkype.PlaceCall("sampleskypeuser", "", "", "");
while (pCall.Status.ToString() == "clsRouting")
{
MessageBox.Show(pCall.Status.ToString());
}
if (pCall.Status.ToString() == "clsRinging" || pCall.Status.ToString() == "clsInprogress")
{
MessageBox.Show(pCall.Status.ToString());
pCall.Finish();
}
if (pCall.Status.ToString() == "clsFailed")
{
MessageBox.Show(pCall.Status.ToString());
MessageBox.Show(pCall.FailureReason.ToString());
pCall.Finish(); // Getting exception at this line (Call Failed)
}
------------------------------------------------------------------------------------
The above code works fine when the called number is working or skype user is online.
I could be able to finish the call (using pCall.Finish()) as soon as the phone starts ringing.
The call is successfully finished and "call tab" is closed on the skype interface.
(Please find the attached file to have a glimpse at the "call tab" which i am talking about)
But when the called number or skype user is offline , i am getting the call status as "clsFailed", Thats fine.
But in this scenario,I am still finding the "call tab" active in skype interface.In order to close this "call tab",
I tried to finish the call when call status is failed , but I ended up with exception(Saying Call failed).
I am forced to explicitly close the "call tab" by clicking the red button on the skype interface.
Could you please suggest me a way to close the "call tab" in the skype interface programatically
when the call status is failed ?