Microsoft Lync and Skype for Business have a rich set of .NET APIs which make it easy to extend the platform and integrate it with other applications. This blog helps explain how to use those APIs.

Sending formatted IMs from a UCMA application

Posted: January 29th, 2012 | Author: | Filed under: UCMA 3.0 | Tags: , , , | 2 Comments »

I can’t honestly say that I’ve run into a lot of situations where I’ve said to myself, “If only I could send an HTML formatted instant message right now, my problems would go away.” But adding formatting to IMs can definitely help with some specialized communication applications such as bots where you want to distinguish different types of messages, or emphasize certain parts of a conversation. So, to make those nice visual touches easier, and for anyone out there who is in a tight spot by virtue of not knowing how to send an IM with special formatting, I thought I’d write up a quick post on it. Continue reading “Sending formatted IMs from a UCMA application” »


Call forwarding, UCMA, and “derived conversations”

Posted: January 25th, 2012 | Author: | Filed under: UCMA 3.0 | Tags: , , , , | 2 Comments »

If you have a UCMA application that communicates with users via both IM and audio in the same conversation, you may one day be caught off guard by the following exception:

Microsoft.Rtc.Signaling.OperationFailureException: Application must register 
for ConversationChanged event when a call is moved to a derived conversation.

Specifically, this exception occurs if you try to add audio to a conversation that currently only has instant messaging and/or application sharing, and the remote party redirects the audio call to a PSTN phone; maybe because they don’t have headphones plugged in, or because they are on a wireless network which has been causing poor audio quality, or even because they are logged in on a client that doesn’t support audio. Continue reading “Call forwarding, UCMA, and “derived conversations”” »


Calling an Exchange UM voicemail box directly

Posted: January 22nd, 2012 | Author: | Filed under: Lync Development, UCMA 2.0, UCMA 3.0 | Tags: , | 4 Comments »

A few posts ago I explained how you can determine whether a call placed by your UCMA application has been answered by an Exchange voicemail box. In this post I want to share another quick tip on UCMA and voicemail: how to place a call directly to a voicemail box. Continue reading “Calling an Exchange UM voicemail box directly” »


Forking SIP requests in an MSPL script

Posted: January 17th, 2012 | Author: | Filed under: Lync Development, MSPL | Tags: , | 10 Comments »

In previous blog posts on Microsoft SIP Processing Language (MSPL), I’ve explained how to essentially intercept SIP requests, such as the INVITE message that initiates a call, and pass them along to a UCMA application for handling by passing a parameter to the ProxyRequest method. In this post, I want to discuss what you can do if you want to “fork” a request, which means you are sending it to multiple endpoints simultaneously. Continue reading “Forking SIP requests in an MSPL script” »


Transferring an A/V call into a Lync conference

Posted: January 12th, 2012 | Author: | Filed under: Conferencing | Tags: , , | No Comments »

If you’ve been digging through the archives of this blog, you may remember that, although UCMA doesn’t allow audio/video calls to be escalated to conferences using the Conversation.BeginEscalateToConference method, there is a sneaky alternative way to accomplish the same thing using AudioVideoMcuSession.BeginTransfer. (Incidentally, this technique, which I wrote about for UCMA 2.0, still works in exactly the same way for UCMA 3.0). This is not the only interesting thing you can do with the AudioVideoMcuSession.BeginTransfer method, however. Continue reading “Transferring an A/V call into a Lync conference” »


How to get the “is typing…” messages through UCMA

Posted: January 9th, 2012 | Author: | Filed under: UCMA 3.0 | Tags: , , , | 2 Comments »

If you’re writing a UCMA application that handles instant messaging, you may at some point want to replicate the effect that users of the Lync client get where a message shows up notifying you when the other person is typing. This makes it a bit easier for people to carry on a conversation over instant messaging without constantly interrupting one another. Triggering and receiving this notification is actually quite easy in UCMA, but the way to do it is not immediately obvious. Continue reading “How to get the “is typing…” messages through UCMA” »


Minimizing performance impact from managed SIP applications

Posted: January 4th, 2012 | Author: | Filed under: Lync Development, MSPL | Tags: , , , | 3 Comments »

The Managed SIP Application API, which I discussed in the previous post, allows you to manipulate the content and routing of SIP messages in some potentially very useful ways by running an application on a Front End Server. However, when the volume of messages is very large, dispatching them to managed code can have a significant effect on performance. For managed code applications that simply monitor messages, and don’t modify them or change the routing, there is a way to mitigate this performance impact by sending the message details to the application from the MSPL script in a sort of “fire-and-forget” mode, using the DispatchNotification method. Continue reading “Minimizing performance impact from managed SIP applications” »