How to set up Office Communicator (for OCO/BPOS) in an alternate chat client (Pidgin)

by Grank July 30, 2010 15:05

I've got to blog on this one, because it was both maddening and seemingly obscure.  (Whenever I can't get a good search result on something, I make a point of blogging on it myself.)

For a long time now, I've used one chat client to handle all of my online presences: my personal Live Messenger (MSN), 3 Google Talk accounts (personal, corporate, and ENTS), Facebook Chat (which is XMPP compliant these days), IRC, even Twitter (though that started to drive me nuts so I stopped using it).  I've tried a few different programs, and am currently finding that Pidgin (formerly Gaim) is my personal best choice for everyday use.

Over the past few months, the office has been transitioning from our existing infrastructure, which was a cobbled-together assortment of SaaS/cloud solutions out there on the interwebs (sort of single-responsibility, pick-the-best-service-for-each-task idea) to a more narrow, integrated approach that reflects our firm commitment to Microsoft software products and solutions.  Part of that has meant moving from Google Apps for our email, calendar, contacts, and chat, to Microsoft Business Productivity Online Standard Suite (BPOS), which among other things gives us Exchange Online for our email, calendar, and contacts, and Office Communications Online (OCO) for our company chat.

While GTalk was obviously a zero-effort add to my all-in-one presence via Pidgin, Office Communicator proved a much more difficult beast to integrate.

The first question was fundamental: what is the server name?

I searched for this quite heavily, to no avail, and eventually had to give in and actually install Office Communicator, dreading having to use more than one chat client.  See, with BPOS, there's a Single Sign-On app that sits in your tray, and automatically configures Communicator for you.  The upside, as I pleasantly discovered, is that even though you never get to enter or know the communications server address, if you open up your Communicator options after successfully signing in and have a look at the Advanced account options, you can just read off the screen the manual configuration that Single Sign-On did.

Now, Pidgin didn't always support Communicator out-of-the-box, and any information you read about it will suggest that's still the case.  Office Communicator implements a version of the standardized SIP/SIMPLE protocol, but Microsoft added enough of their own (clearly documented but non-standard) stuff to it that just using SIP/SIMPLE won't work.  The good news is that there's a very good third-party plugin called SIPe that adds support for Office Communicator to Pidgin.  You might have to install this yourself, as I can't find any indication of where it might have been merged into the trunk, but the Windows binary I have had it already installed, and "Office Communicator" actually appeared as a protocol choice in the Pidgin account management tool already.

The settings with which I had (eventual) success when adding the account to Pidgin were as follows:
Username: my full email address
Login: just my login name; I didn't put a domain name or full email address
Password obviously.
Now head to the Advanced tab, and put in your server and port you got from the Communicator settings (mine was pool1.oconline.microsoftonline.com:443, which looks probably pretty standard, but I'm sure that could change at any time).
Connection type has to be SSL/TLS, obviously.
Don't check Kerberos, but check Single Sign-On.

Here's where it got tricky:
If you just leave it at that, you'll get an irritating error message.


You have been rejected by the server: You are currently not using the recommended version of the client.


Well yes, Microsoft, I do realise that.  Unfortunately, when they say "recommended", they actually mean mandatory; this is the header message of a 403 Forbidden that your Pidgin has just been sent.

You probably noticed the User Agent field that I skipped over in the Pidgin settings, because I didn't know what to do with it when I was first setting this up and assumed it was optional.  As it turns out, this is actually used in a SIP header just like the User-Agent of a web request, and OCS strictly adheres to it when deciding if it can support you (so says the Microsoft SIP registration extensions documentation).

So, I guess we need Pidgin to speak OCS's secret password before it can get into the Communicator clubhouse.

You could connect with Communicator and sniff for that if you're feeling ambitious, but let me save you some time.  Here's a really handy unrelated blog entry that shows us a great example of some functioning OCS SIP headers, including a User-Agent that matches my installed Communicator version.

So I set my User Agent field in the Pidgin account settings to "UCCAPI/3.5.6907.0 OC/3.5.6907.0 (Microsoft Office Communicator 2007 R2)", and now it works as expected.

It's quite likely this could break once new versions of Communicator come out, as OCS will probably expect you to upgrade the client, and it's also possible that, if that happens and you pass the new User-Agent string for the new version, you'll experience some bugs or quirks or unsupported behavior.  Right now, however, with my build of Pidgin 2.6.6 which integrates SIPe 1.10.0, it's perfectly compatible with Communicator 2007 R2 3.5.6907.0.

Hope someone out there gets use out of this write-up!

Comments

3/24/2010 2:13:37 PM #

Vincent B.

Hello,

I try to do exacty the same.
We are on the cloud now ;) BPOS powaaa
I'm using pidgin 2.7.2 on windows 7 (x64) with last version of Sipe.
But I got an Authentification failed.

Any idea ?

Vincent B.

3/28/2010 6:42:55 PM #

Grank

I have it checked off to use Single Sign-On.  Your authentication will fail if you check the Kerberos option, or at least, it did for me.  It will also fail if you're not signed into the Single Sign-On tool in the tray (blue and white Microsoft Online Services tray icon).  If you don't have that installed, I think this is the one you need:
www.microsoft.com/.../details.aspx

Grank

4/18/2010 9:24:29 PM #

Mathias

sending - Thu Aug 26 13:21:35 2010

######
SIP/2.0 501 Not implemented

Contact: (null)

Content-Length: 0



I get an SSL read error, im using Ubuntu on a not "domain-enabled" computer.

Got any clues?

######

(13:21:35) sipe: received a unknown sip message with method HTTP/1.1 and response 501
(13:21:35) sipe: SSL read error
(13:21:35) connection: Connection error on 0x18adf60 (reason: 0 description: SSL read error)

Mathias

4/18/2010 11:40:05 PM #

Mathias

I tried to connect to our OCS but only get this error.
Im using Ubuntu and Pidgin

Missing some SSL package?

(13:21:35) sipe:

sending - Thu Aug 26 13:21:35 2010

######
SIP/2.0 501 Not implemented

Contact: (null)

Content-Length: 0




######

(13:21:35) sipe: received a unknown sip message with method HTTP/1.1 and response 501
(13:21:35) sipe: SSL read error
(13:21:35) connection: Connectio

Mathias

Add comment


(Will show your Gravatar icon)

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen | Modified by Mooglegiant

About The Author

I'm a software developer and musician in Edmonton, AB.  I write mostly web-based software, primarily on the Microsoft stack.  I have an MCPD and several MCTS, but I've only been at this whole developer thing for a few years, and the truth is that I'm still learning more than knowing.  So these are my adventures and experiments and some of it will probably be blatantly wrong...  Just warning ya.