Accessing UCMA Application Endpoints from Skype

As the first step of Lync - Skype integration Microsoft released presence, IM and audio interoperability in May 2013. It is available both for Lync Server 2010/2013 users and Office 365 users. Other modalities such as video, desktop sharing and functionality like conferencing are not available yet but I think we might see them in the near future.

The entire process to provision Lync - Skype connectivity is well described in the document “Provisioning Guide for Lync - Skype Connectivity”. The document is available [here]. I do not want to repeat the same description but in a nutshell, Lync Server 2013 administrators need to do is the following:

  1. Register the Access Edge Server FQDN and SIP domains on the Microsoft web site https://pic.lync.com and wait for 30 days (in case you are not lucky)
  2. Enable federation and public IM connectivity (Lync Server 2013 Control Panel: Federation and External Access >> Access Edge Configuration)
  3. Enable communications with federated users at least in one user or site scoped  external access policy (Lync Server 2013 Control Panel: Federation and External Access >> External Access Policy)
  4. If communications with federated users is enabled in user scoped external access policy then assign that policy to the Lync enabled users you want to be able to communicate with Skype users. Site scoped policies will be automatically applied in the associated Lync site.
  5. Configure Skype as a Public Internet Cloud (PIC) using Lync Server Management Shell (New-CsPublicProvider cmdlet)  

After these Lync Server configuration steps are done then a Skype user signed in using a Microsoft Account can add a Lync user to his Skype contact list and a Lync user can add such a Skype user to his Lync contact list. According to my experience, it might take a few minutes until presence starts working but after that presence, IM and audio works as expected. Audio quality is good, however you might face a significantly longer call setup delay comparing to pure Skype-Skype or Lync - Lync calls. You might also face 10-15 secs silence during the first part of the call establishment (before ringback tone starts).

Audio call from Lync user’s perspective

lync_gui_skype_call.PNG

Audio call from Skype user’s perspective

skype_gui_lync_call.PNG

OK. It is working between Skype and Lync users in both directions but what about Lync Server trusted application endpoints (aka UCMA applications)? Can we expose middle tier UCMA application (e.g. contact center) endpoints to the Skype community? Can Skype users add application endpoints to their contact lists and dial these endpoints in the same way as they add/dial Lync users?

Well the answer is: yes and no. No, because it does not work by default. Yes, because you can make it work by undertaking some painful Lync Server development.

A Skype user can add a UCMA application endpoint to his contact list in the same way he adds a Lync user but Lync Server does not publish application endpoint presence (SIP NOTIFY) towards Skype by default. The fact that the external access policy assigned to the application endpoint (Grant-CsExternalAccessPolicy) enables communications with federated users does not help.  This has the consequence that Skype users cannot dial the UCMA application endpoint since desktop Skype clients do not allow dialing contacts which are in Unknown or Offline status (see the screenshot below; UCMA application endpoint URI is masked)

skype_gui_lync_ep.PNG

The painful development I have mentioned above is described [here]. This development is actually the same which was required for Lync Server 2010. Nothing has changed … It requires some Microsoft SIP Processing Language (MSPL) and managed code development to capture presence subscription requests (SIP SUBSCRIBE) coming from Skype and publish Online status back. Hopefully, this functionality will be the integral part of the Lync Server infrastructure soon and no such additional development will be required anymore.

Hopefully, enabling Skype user <=> UCMA application connectivity will be as simple as enabling Skype user <=> Lync user connectivity. It will just require some connectivity and policy settings in Lync Server Control Panel or Lync Server Management Shell. This would be another big step toward Unified Communications.

Forcing Lync Server to publish presence

Note, that your UCMA application can publish legacyInterop presence category and thus force Lync Server to publish application endpoint presence toward Skype

int state = (int)availability;
string picXml = "<legacyInterop availability=\"" + state + "\"/>";
CustomPresenceCategory picInteropPresence = new CustomPresenceCategory("legacyInterop", picXml);

List<PresenceCategoryWithMetaData> picState = new List<PresenceCategoryWithMetaData>();
picState.Add(new PresenceCategoryWithMetaData(0, 0, picInteropPresence));
picState.Add(new PresenceCategoryWithMetaData(0, 100, picInteropPresence));

List<PresenceCategoryWithMetaData> presence = new List<PresenceCategoryWithMetaData>();
presence.AddRange(picState);

endPoint.LocalOwnerPresence.BeginPublishPresence(presence.ToArray(), [callback], null); 

but if you do that then you might soon face the “maximum subscriber issue” on the Lync Server. In my opinion, this is just a hacking … Exposing application endpoint’s presence toward Skype should be a built-in functionality of the Lync Server infrastructure. The solution must be scalable and should be completely seamless for UCMA application developers.