Tell me why I have all the time call status = clsCancelled ?? I try to just make a call from Skype with C # code. Text messages work OK, but do not want to call. Yesterday, when the ideas were already over, I checked it under another login, sent another Skype user, so the clsRefused events immediately followed, and then clsRunning seemed to dial. After that, he was delighted with the success, but repeated all the options were repeated clsCancelled again always and constantly .... ((

 Skype skype; try { skype = new SKYPE4COMLib.Skype(); if (!skype.Client.IsRunning) { skype.Client.Start(true, true); } //skype.Attach(8, true); Call call = skype.PlaceCall("test-user-nickname"); do { System.Threading.Thread.Sleep(100); Console.WriteLine(call.Status + " " + call.TransferStatus); } while (call.Status != TCallStatus.clsInProgress); } catch (Exception ex) { Console.WriteLine(ex.Message); } 

    1 answer 1

    To display the skype state, it is better to remove do { Thread.Sleep(); ... } while(...) do { Thread.Sleep(); ... } while(...) .
    Instead, you need to connect to events like this:

     using SKYPE4COMLib; // ... var skype = new SKYPE4COMLib.Skype(); // ... skype.CallTransferStatusChanged += (s, e) => { Console.WriteLine(s.Status + " " + e); }; 

    or so:

     skype.CallTransferStatusChanged += Skype_CallTransferStatusChanged; // ... private static void Skype_CallTransferStatusChanged(Call pCall, CallStatus Status) { Console.WriteLine(s.Status + " " + e); } 
    • I correctly understood that I could not make a call, because of the termination of support? support.skype.com/en/faq/FA12322/… - Oleg Kamnev
    • stopped in 2013, but there is an example - published in September 2014 - here - Stack
    • In this example, the bot only exchanges messages, there is nothing about calls. - Oleg Kamnev