Understanding Persistent Chat File Transfers

One of the new features of Lync 2013 February 2014 (CU5/SP1) update that has gone under the radar is the ability to do file transfers from Lync to persistent chat room.  To me this is a BIG add to the client because it’s been one of the deployment blockers of Persistent Chat.  Everyone loves the idea of persistent chat but they want to be able to use all of the features in a single client and file transfer was a major miss at RTM.

What does it look like?

If you are familiar with file transfer in Lync 2013 client, than you know exactly what persistent chat looks like.  Here is a quick screen shot.

pic3

From here you can open or save the file.

How does it work?

We can start by looking at a quick diagram of the traffic flow.

pic2

Here we can see there are two protocols in play.  XCCOS over SIP is the protocol that Group Chat (formerly Parlano) was built on top of.  With Lync, we take that messaging protocol and wrap it in SIP.  The second is HTTPS, which is the real work horse in this scenario.

When you copy a file into the Lync client it appears the file is being upload via HTTPS.  Here is what we find in Fiddler:

pic4

We can see four SOAP requests to the front-end server that hosts the Persistent Chat end-point.  You can run a get-cspersistentchatendpoint to get back detailed information our PChat object:

pic5

NOTE: It’s important to remember that all users, contacts, objects follow pool pairing.  So if lyncfe03 was in a pool pairing relationship with another front-end pool and that pool was failed over, than the persistent chat endpoint would register with the backup pool.

If we dig into each of the four soap requests we have:

pic6
Get Unique Name for File Extension
pic7
Get Max File Upload Allowed
pic8
Get Content Size
pic9
Upload

Now that our file has been uploaded we can then go to the file share and see these files are uploaded.

pic10

NOTE: The files in this file share are NOT encrypted.  You can open any of these documents with whatever associated application.  For example, these are Word documents and I was able to open them up directly.  The following groups have permission to this folder: RTC Component Local group, RTCComponentUniversalServices and RTCUniversalServerAdmins.

File Download

This process is clearly done via HTTPS.  When saving a file we see:

pic11

And when we look at the contents of each one we can see that it’s simply downloading the file contents:

pic12

Hopefully this sheds a little light on the file transfer process with Persistent Chat.

Easter Egg Feature

According to the Lync Team Blog post about the client updates it notes that file transfer feature is only supported with internal clients.  However, as you can see, if everything is happening via HTTPS than there is no reason why this has to be true.  In my testing, I found that if you published your URL via your reverse proxy, this feature works fine externally.  I tested this with both TMG and IIS ARR as my reverse proxy.  Of course, limitation might exist if your pools are named with internal domains which cannot be published externally but it appears as though the feature exists.  My hope is that in the future they modify the process to just ride on top of the already existing web services URLs.

7 thoughts on “Understanding Persistent Chat File Transfers

Leave a Reply

Your email address will not be published. Required fields are marked *