Thursday, May 29, 2008

Getting and setting presence using UCMA

After publishing the first 2 articles about getting and setting presence using UCMA, Paolo Tuninetto came up with a scenario in which it didn't quite behaved the way I expected it to be.

If you did set the presence of your application it did show up online in the OC Clients. If you were getting the presence of some one using the OC client it got the correct presence back. That was the scenario I used and tested.

But if you set the presence using one application and getting it with an other the way I described it. It didn't work.  Still in the OC client the correct presence was set.

So what was going on? Actually the problem was in both the setting and getting the presence. Getting the presence the way I described uses the old (legacy) way of getting presence. And we set the presence using the new (enhanced presence) way.

The solution was either getting the enhanced presence or  setting the legacy presence. Actually it's better to do both. The way I was getting the presence only supports the old way. The best way for getting presence is actually subscribing to presence, which I will address in an other article.

So we had to set the legacy presence also.

This is almost the same as publishing the enhanced presence, except that the category is different.

string PresenceBlobLegacy = "<publish xmlns=\"http://schemas.microsoft.com/2006/09/sip/rich-presence\"><publications uri=\"{0}\"><publication categoryName=\"legacyInterop\" instance=\"0\" container=\"{1}\" version=\"{2}\" expireType=\"user\"><legacyInterop availability=\"3500\" /></publication></publications></publish>";



For more information contact sip:marc.wetters@e-office.com

1 comment:

Joachim Farla said...

Nice information! Good to see you also post corrections on previous posts. Keep up the good work!

working at e-office