wpflyncskype-for-businessucmaucwa

Starting Lync conversation from C# WPF desktop app regardless of Lync client version installed


I'm new to Lync integration and development.

I am trying to write a feature to allow an existing desktop WPF line of business application to launch a Lync conversation with another user on the local intranet where the app is running.

The difficulty I face is that the application will not know up front what version of Lync client is installed on the user's PC. The app is deployed in various organizations and therefore can't make assumptions about client or server side versions.

At this stage the app is going to try launch whichever version of the Lync executable it can find on the PC, with a shortcut SIP, as shown here: https://technet.microsoft.com/en-us/library/gg398376(v=ocs.14).aspx

"You can use command-line parameters to quick-start Microsoft Lync"

I am also considering the UCMA (server side) API, although I'm worried that again I will have to worry about what server version is running.

Is there a better "version agnostic" way of doing this?

It seems that each version of the client SDK is incompatible with previous versions. This will mean I need to first detect what version of Lync is installed; and then use the appropriate SDK. This will also mean distributing multiple copies of the Lync SDK; and will also likely mean needing to create a new version of the application when successive versions of Lync are released.

I did note that there might be a server-side API (UCMA) that I could use across the different versions of Lync/OCS/Skype for Business, although there are mentions that this API is more "advanced" and is "to be avoided".

Some reading I've done:

what are difference between "Lync Server 2010 SDK" / "UCMA 3.0 SDK" / and UCC API?

http://blog.thoughtstuff.co.uk/2014/07/lync-development-picking-the-right-api/

Which Lync SDK? Send IMs from managed code

Can anyone share any thoughts about this problem, have I missed something?

Ideally I'd like some kind of layer of abstraction where I could call a method to start a conversation, and not worry about what client is installed on the PC or what version is installed on the server. I realize this might be an unrealistic expectation!

I have tried searching through SO on the Lync tag; if this is a repeat question, sorry!


Solution

  • It sounds like you want to use the Lync Client SDK. That this SDK really does is remote control the "Lync Client". To start the Lync client if it's not running, is just run "lync.exe". A Lync client install will always have this exe in the path so just running it should work ok. (does for me so far)

    Lync 2010 is rather old. I would use Lync 2013 Client SDK. I use that version as it works for the 2013 client up to the latest Skype For Business 2016 client.

    I would download / install the client SDK and check out the examples. You should to find examples of most things you want (starting a audio conversation, starting a IM conversation, etc). Pretty much anything you can manually do in the client you can remote control via the Client SDK.

    If you want a abstraction layer over the versions, you will have to do that yourself as it's not supported by the SDK's themselves. Although I wouldn't bother and just support from Lync 2013 and greater.

    If your going to do a abstraction layer you will need to test on all the Lync server setups. Good luck on that... We have Lync 2103 server and Skype for Business setup here (they can co exist) and it's a huge setup. A basic setup can be about 6-7 servers and it hooks into your AD. So to run different versions will require multiple AD's as well. You may need PSTN / sip trunk access to test external calls or federation setup for external network access to/from external clients or federated orgs (like consumer skype). If you need to go anywhere near high availability you server requirements just skyrocket...