Sending INFO messages (or other messages) with UCMA
Posted: January 8th, 2013 | Author: Michael | Filed under: UCMA 3.0, UCMA 4.0 | Tags: INFO, SIP, UCMA | 2 Comments »This is one of those random things in UCMA that you almost never have to use under normal circumstances, but in that one very unusual case where you do have to use it, it can be very frustrating trying to figure out how it works in the API.
AudioVideoCall has a pair of methods called BeginSendMessage and EndSendMessage. The purpose of these methods is to allow you to send specific SIP messages within the SIP dialog established for the call. You can send a number of different types of SIP requests, such as INFO, OPTIONS, NOTIFY, or SERVICE, and you have to build the entire message body yourself, and pass it in as a byte array. UCMA will help with some of the headers, but you can also add your own if you like.
I can’t think of any reason you’d need to use this method when operating completely within a Lync environment. The main use case I’m aware of is when your UCMA application is placing or receiving SIP calls directly with a non-Lync SIP endpoint. In this case, you might need to send an INFO message, for example, to trigger a specific kind of behaviour or pass along details for the call. This is how you can do it.
If you need finer-grained control over the other SIP messages sent and received by UCMA – for example, to change how UCMA behaves when initiating calls and doing media negotiation, there’s not really any way to do this entirely within the “collaboration” layer of UCMA, or the Microsoft.Rtc.Collaboration namespace. Your options are either to build your solution on the “signaling” layer – the classes contained in Microsoft.Rtc.Signaling – or use MSPL or the Lync Server SDK to modify the messages outside of your UCMA application.
Can this be done in the IM session?
Might this be useful in keeping a end-user session communicating with a UCMA app from idling out on no activity?
The UCMA app could send out one of these to the client to keep the SIP session from idling out?
[…] Sending INFO messages (or other messages) with UCMA […]