Share via


Why Does Presence Auto-reset After Manually Selecting Busy or Do Not Disturb?

Last week one of my customers approached me about a specific behavior they were seeing with regards to presence that was impacting both Lync 2010 and 2013 clients. The customer stated that each day presence would revert back to Exchange calendar status after manually configuring Lync client to either Busy or Do Not Disturb (DND).

I haven’t specifically seen this behavior before, but then again I also haven’t really been looking for it either! So I began by doing some detective work. First, could I reproduce the behavior in a closed lab? Turns out I could, so I started digging into the client-side UCCAPI logs to see what was going on (note: Lync client logging must be enabled and set to FULL) and found the following SIP SERVICE out message after manually setting my presence to busy:

 

From this message we get several pieces of good information although a bit cryptic. So let’s briefly discuss some of these to get a better understanding of what they mean. The important flags here are: type, availability, expireType, and expires.

First let’s call out the different types, which are more formally called “state categories” and have four options: Machine state, User State, Phone State, and Calendar state. Each of these types have their role to play in presenting the most accurate presence information to users, but today we’ll only be looking at the “user state” request at a very high level. A “user state” request simply means that the user has manually set a specific presence from the drop-down list in the client (an override if you will). You will notice this state category is used in the SIP SERVICE message above, so let’s keep that in mind going forward.

Next we’ll talk about the availability flag. Each of the four aforementioned “state categories” has its own set of values called “availability numbers”. A specific availability number represents a specific type of presence. Using our SIP SERVICE message above as an example, if we wanted to see what the User State availability mode (presence) of 6500 is, then we could reference the User State Availability Number chart below:

Based on this chart, we know that the value of 6500 means that the user manually set their presence to busy. Cool! But what does this have to do with the presence automatically resetting each day? This is where the “expireType” and “expires” flags come into play.

Any time a user manually selects either “busy” or “Do Not Disturb” from the drop-down menu in the client UI, it is executed as a time-bound operation. This is clearly indicated in the referenced SIP SERVICE message above as we can see the “expireType” value is set to time along the “expires” value of 86400, which is 86,400 seconds or 24 hours. Note: The value of 86400 cannot be changed.

So now we have the whole picture: When a user manually sets their presence to busy, behind-the-scenes the Lync client is issuing a SIP SERVIICE OUT message indicating that a User State category with an associated Availability Number of 6500 and a corresponding time bound operation which will automatically expire in 24 hours. Therefore this is expected behavior.

This article is not meant to be a deep dive on Lync enhanced presence, but rather an article to call out a specific client behavior and how we determined it was expected. With that in mind, you may also be thinking this is great information, but how would anyone ever piece this together? Good question! I often reference the Lync 2010 Resource Kit documentation and this situation is no exception. All of this information can be found (plus a ton more) in the document for Enhanced presence found from the 2010 Resource Kit located here. I highly recommend a full read.

I’d like to credit the authors of the Lync 2010 Resource Kit documentation for their contribution to this article.

-Swagger out