Integrating presence into your applications

I have seen a lot of questions lately asking how one can add presence to a communications application.  There are a number of ways to do this, but I don't think we have done a great job explaining what they are.

First, and perhaps what has confused people the most, there is currently no support for presence in UCMA 1.0. I can certainly understand that this doesn't seem to make sense, especially because UCMA has support for SUBSCRIBE, NOTIFY, and PUBLISH SIP messages.  The primary reason for this is the interal presence protocol we use is not public.  Therefore, although UCMA 1.0 does support the appropriate SIP messages for presence, you would need to know the protocol used to specify and extract presence information.  I do suspect this will be corrected in the future, but this is the case for the current version of UCMA.

So how can you detect a user's presence and set it in your own applications?  There are three ways that I know of and I will describe them in order of easy - hard.

First, you can use the Microsoft Office Communicator 2007 SDK, available here.  This is what Microsoft Office uses and so, if your goal is to add presence support to an existing client application, this is probably your best bet.  The API is quite simple and easy to follow.  Perhaps in a future blog I will give some examples.  This API also uses Communicator for the actual communications pieces.  You can see this in Outlook today.  If you select to call someone, Communicator opens and does the actual calling.  The call is not made through Outlook.  For most people, this is fine - but if you want your own control over the communications experience you will need to use UCCA, which is listed below.

The second possibility is to use Communicator Web Access.  This is the best way to go for web applications and can also be used by client applications through secure HTTP requests.  This is also the best solution to use when you have non-Windows clients.  I currently do not have plans to cover this API, but if there is interest in it I can make an effort.  Currently CWA is the only solution I know of for server applications.

The third possibility is UCCA, which I described in more detail in an earlier blog.  This is clearly the most difficult solution, but is also the most powerful.  Typically UCCA is used to create new clients functionally similar to Communicator.