3

I am trying to make a call programmatically through Skype. Skype is installed in my PC but when I try to make the call through Skype API with C# then every time I get an exception:

Connection refused

I am not able to fix it. I am trying since a long time to make a call but every time I get the same error.

Here is code snippet by which I am using to make call:

Skype skype;
skype = new SKYPE4COMLib.Skype();
string SkypeID = "+447851359661";
Call call = skype.PlaceCall(SkypeID);
do
{
    System.Threading.Thread.Sleep(1);
} while (call.Status != TCallStatus.clsInProgress);

I guess I am definitely missing something in the code. Please guide me. Thanks

Zong
  • 6,160
  • 5
  • 32
  • 46
Thomas
  • 33,544
  • 126
  • 357
  • 626
  • 3
    Where did you get the code? Are you following the Skype API documentation? Seems odd that there isn't any sort of authentication happening here. – Chris Ballard Mar 13 '14 at 15:00
  • 2
    possible duplicate of [Using Skype API to make call](http://stackoverflow.com/questions/22353334/using-skype-api-to-make-call) – Vivek Jain Mar 13 '14 at 15:04
  • you don't log to skype with your account or connect to skype network – giammin Mar 13 '14 at 15:04
  • Have a look at this answer: http://stackoverflow.com/questions/1259923/implementation-of-skype-api?rq=1 – Sean Airey Mar 13 '14 at 15:30
  • Thomas is my friend. he first login to skype then he run his c# program. so no need to login to skype programmatically. when he is running his c# wrap then he is getting the same error again & again. the error is "connection refused" – Mou Mar 13 '14 at 18:12
  • here is the answer link http://synqit.com/skype-refused – Mou Mar 13 '14 at 18:47

1 Answers1

1

here is the code

using SKYPE4COMLib;

Skype skype;
            try
            {
                skype = new SKYPE4COMLib.Skype();
                if (!skype.Client.IsRunning)
                {
                    skype.Client.Start(true, true);
                }
                //skype.Attach(8, true);
                Call call = skype.PlaceCall(textBox1.Text);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

before run the code follow this step http://synqit.com/skype-refused . hope help.

Error during Skype communication: Connection refused. enter image description here That error means that that Skype denied access to Synqit. To allow Synqit to access Skype, select Skype menu Tools | Options... | Advanced | Manage other programs' access to Skype | find Syniqt in appeared list and click Change. Connection Refused

Start Synqit import once more and allow Synqit to access Skype.

Mou
  • 15,673
  • 43
  • 156
  • 275
  • Do you know where to find this on the latest skype version for mac? Can't find it there :-( – d4Rk Jun 13 '16 at 12:43