Konstantinos Papakonstantinou Konstantinos Papakonstantinou - 10 months ago 68
C# Question

Lync Client SDK PSTN Calling

I am using Lync Client SDK 2013, to communicate with Skype for Business through a C# program.

However, I cannot find any reference in SDK documentation on how to make a PSTN call using the SDK.

Is this possible at all? A short C# code example would be useful.

Answer Source

You use the "tel:" URI to say want number you want to dial instead of the sip URI. The number you use depends on the dial plan setup of your Lync Server. If you want to avoid dial plan problems, stick with E164 formatted numbers and it will work with any number on any Lync Server anywhere.

Dialing with the Lync Client is the same as with a normal sip uri except you use a tel formatted uri instead:

    var participantUri = new List<string> { "tel:+6491234567" };
    var automation = LyncClient.GetAutomation();
    automation.BeginStartConversation(AutomationModalities.Audio, participantUri, null, ar =>
        }, null);

Note: there is no error checking and the BeginStartConversation / EndStartConversation calling can be done in many different ways / styles.