Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling With Skype - Again
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01445017
Message ID:
01445152
Vues:
46
>>>I have been Googling this for a week now and have yet to find an example of how to place a Skype call using C#. Does anyone have an experience with this?
>>
>>Haven't downloaded it but did you see this :http://www.codeproject.com/KB/cs/skypecontrolapicsharp.aspx
>
>Yes, I already looked at it. It uses Windows Messaging. There is a COM wrapper produced by Skype called Skype4COM that I have. So far I have this:
>
>
>public class SkypeAPI
>{
>    public void MakeCall()
>    {
>        SKYPE4COMLib.Skype skype = new SKYPE4COMLib.Skype();
>
>        if(! skype.Client.IsRunning)
>        {
>            skype.Client.Start(false, true);
>        }
>        
>        skype.Attach(7, true);
>
>        Call call = null;
>
>        try
>        {
>            call = skype.PlaceCall("Office", null, null, null);
>        }
>        catch(Exception e)
>        {
>            throw e;
>        }
>
>        string CallFailureReason = skype.Convert.CallFailureReasonToText(call.FailureReason);
>        MessageBox.Show(CallFailureReason);
>
>        if (call.Status != TCallStatus.clsFailed)
>        {
>            call.Finish();
>        }
>    }
>}
>
>
>CallFailureReason is coming back as "User is offline" or "Misc error". There is very little documentation that I can find, so I'm sort of stuck here.
>
>There are some C# examples here, https://developer.skype.com/Docs/Skype4COM/Example, but none that place a call.

My guess is that your "User is offline" error is because you are not using the correct parameter in the PlaceCall() method. "Office" looks more like you own 'friendly name' Look at the profile for that name to check the true 'Skype Name' that should be used....

If you have Skype visually on screen you can check whether it is attempting to call the right contact....

HTH,
Viv
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform