Friday, October 21, 2011

Lync Loses Connection Every 8min 28sec

If you enjoy CSI-like detective stories (and by CSI, I mean cheesy quips as he puts on his sunglasses, NOT this) centered around isoteric computer issues involving Lync, then you'll love this post.  For the other 6.99999 billion people in the world, move along....nothing to see here.

Late last week, my Lync client on my main work desktop started acting oddly.  Every so often, it would spontaneously lose its connection, log out, and re-login again - all within about 5-10 seconds.  At first, I suspected a network problem.  Running a steady ping against the Lync edge server showed a constant connection.  I looked at the Lync servers for any potential issue, thinking it was something that could be affecting everybody, but all seemed well.  It was late in the day on Friday, so I dealt with it like I deal with all my problems.....ignore it and hope it just goes away.

Monday morning - same thing.  It was starting to get annoying.  I'd be in the middle of an IM conversation, and BAM, log out and back in again.  Audio calls were unaffected, except for the message about limited connectivity popping up.  Weirdly enough, when I logged on via my laptop, the issue never came up, which lead me to believe it was a problem with my desktop computer.  Even more weird was that if I logged onto another Lync account on the same pool via my desktop, the problem never came up.

The first thing I tried was to restart my computer.  Didn't fix it.  Then I exited Lync and deleted all my settings in my %userprofile%\AppData\Local\Microsoft\Communicator folder.  No change in behaviour.

There were no relevant messages in the Event Log, even though Event Log logging was turned on.  I decided to turn on detailed logging via Options - General - Turn on logging in Lync.  You should only turn on this option when troubleshooting an issue, because it can take up a lot of disk space.  Logs are stored in the %userprofile%\Tracing folder.  The Communicator-uccapi-0.uccapilog is the log file to look at.  This file will grow to about 50 MB before it rolls over into Communicator-uccapi-1.uccapilog and so on.  It's Notepad-friendly. 

Digging through the log, I focussed on the time where the issue arose.  I started to notice a pattern.  My client would lose its connection EXACTLY every 8 minutes 28 seconds.  I racked my mind to think of what would be happening every 8:28, but nothing came to mind.  I ripped out all the log data surrounding that time to try to find a pattern.  This is the sequence that repeated every 8:28:

10/18/2011|12:23:30.119 1674:2350 INFO  :: UCCP:ClientAllowedAuthProts0x10004
10/18/2011|12:23:30.120 1674:2350 INFO  :: SIP_REGISTER::RefreshRegistration force(1),refreshSA(1),refreshRoute(0),state(2)
10/18/2011|12:23:30.120 1674:2350 INFO  :: SIP_REGISTER:State (2) => (4)
10/18/2011|12:23:30.120 1674:2350 INFO  :: SA(b0b8c38) Dropped
10/18/2011|12:23:30.120 1674:2350 INFO  :: Out trxn corr-id (0CE823A8)
10/18/2011|12:23:30.127 1674:2350 INFO  :: SignMsg:NoSA for request(ce823a8)
10/18/2011|12:23:30.127 1674:2350 INFO  :: SignMsg: send request without signature for trans(ce823a8)
10/18/2011|12:23:30.127 1674:2350 INFO  :: Trxn corr-id (0CE823A8), SIP msg corr-id (7aa8ef7f)
10/18/2011|12:23:30.127 1674:2350 INFO  :: Sending Packet - (From Local Address: 793 bytes:
10/18/2011|12:23:30.127 1674:2350 INFO  :: REGISTER SIP/2.0
Via: SIP/2.0/TLS

The client would then try re-registering itself multiple times (about 10) for about 3-5 seconds, which would generate a SIP/2.0 401 Unauthorized from the server.  Then, it would just log back in as if nothing ever happened. 

It looked to me like the line that had SIP_REGISTER::RefreshRegistration force(1),refreshSA(1),refreshRoute(0),state(2) was the likely culprit, but I still had no idea why it was happening.  I ran log captures on working machines and never saw that line appear anywhere else.  Internet searches came up blank.  I even ran traces from the front-end Lync server, which only showed me the multiple 401 Unauthorized messages it was returning to the client.  No indication why it was not allowing me in.

I tried uninstalling and reinstalling Lync.  Nope.  I tried uninstalling and searching and deleting any trace of Lync in folders and the registry.  I deleted any cached credentials in Windows via Credential Manager.  Nope.  In frustration, I even deleted my Lync account and re-created it.  Nope.....Chuck Testa.

Then I tried creating a new local account on my desktop and logged into Lync.  Great success!!!  The problem was gone.  However, I wasn't all that thrilled because I didn't want to go through the pain of moving all my profile data to a new account.  Plus, it felt like giving up....kind of like when you re-install the OS to deal with an issue.

So, I reasoned that there must be something about my profile that was causing the issue.  So, I logged back into my main account, deleted all the temp files in %userprofile%\TEMP, cleaned out my browser history and cache, and restarted.  Amazingly, the problem was gone.  It's been 3 days and my client has been working normally.

I'm not sure if it was cleaning out the TEMP folder or the IE cache that fixed the problem.  Ideally, I should have tried one or the other first, but I was getting tired of troubleshooting by this point.  If anybody has any insight as to what was really going on, please drop me a line.

Monday, October 17, 2011

Lync and Skype: What's Next?

As posted in many places on the net, Microsoft's acquisition of Skype is complete.  There has been a lot of speculation as to what this means for Lync.  I'm going to add my 2-cents worth, just to see if we can get some discussion going.

In the short term, I don't think you're going to see much difference in the way either platform is marketed. Skype already has a huge user base, and people are likely nervous about what MS will do. I'll bet that you will still be able to download Skype and use it as you always did. On the Lync side, I think you will see an option to add Skype as a 3rd party public provider, just like you can already with MSN/Yahoo!/AOL. This might arrive with the rumoured Lync service pack. If it doesn't come with Lync SP1, then we'll probably have to wait until the next release of Lync.

I think you'll see the biggest Skype-Lync integration will come with Lync "15", but not with the on-premises version. The on-premises version will likely keep Skype as an optional public provider, which will allow Lync to integrate with not only Skype, but by extension, other platforms that has Skype connectors. This could be the universal connector that current IP-PBXs can use to connect to Lync and other disparate phone systems. This could help companies save money, by providing a communications channel that doesn't rely on the PSTN.

I predict that you won't see Skype integration at the Lync "15" Online level at all. I think Skype will melt into the background as the base provider for Lync Online's worldwide PSTN telephony integration. The current version of Lync Online does not support PSTN connectivity as of yet. For Microsoft to provide the centralized support for PSTN connectivity it needs to do for a worldwide user base, Skype is an obvious choice. Skype already has a worldwide presence for users to obtain local PSTN phone numbers. If Lync Online can integrate Skype in this manner, then it will vault Microsoft well ahead of the competition to provide corporations worldwide with a secure, easy-to-use and scalable online solution for all their telephony needs.

Companies will be able to sign on with Lync Online and be able to provision users with PSTN numbers almost anywhere in the world. Lync will be a better choice for corporations, because it can be centrally controlled, managed, and users will be able to use their existing corporate credentials. This is a much more palatable solution than Skype, which is geared more towards the end-user or SMB, and isn't controllable by corporate IT.

Microsoft will also benefit financially by siphoning off those corporate users who currently use Skype because there's no suitable corporate alternative. By bringing them into the Lync Online fold (hopefully with as little migration pain as possible), Microsoft will be able to realize a much higher revenue stream per user, compared to Skype.

What do you think? Any other thoughts on the matter? Drop a comment.

Friday, October 14, 2011

IETF RFCs Supported by Lync

I was responding to an RFP, and one of the questions was a list of the IETF RFCs that Lync supported.  There didn't seem to be a central list anywhere, so I compiled a list myself.  If you're in a similar situation where you need this kind of info, hopefully this will help!  Much of this was taken from Microsoft's official protocol documentation at  If the RFC was listed in the Normative References section, I added it here.  The RFC may not be followed to the letter, and may have been added on to as well.
Any additions or corrections would be greatly appreciated. 

RFC # Description Relates To Link
RFC 1321 The MD5 Message-Digest Algorithm Security
RFC 2045 Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies Conferencing
RFC 2104 HMAC: Keyed-Hashing for Message Authentication Security
RFC 2111 Content-ID and Message-ID Uniform Resource Locators Telephony
RFC 2118 Microsoft Point-To-Point Compression (MPPC) Protocol Base
RFC 2132 DHCP Options and BOOTP Vendor Extensions Base
RFC 2141 URN Syntax Base
RFC 2190 RTP Payload Format for H.263 Video Streams Media
RFC 2198 RTP Payload for Redundant Audio Data Media
RFC 2246 The TLS Protocol Version 1.0 Security
RFC 2315 PKCS #7: Cryptographic Message Syntax Version 1.5 Security
RFC 2459 Internet X.509 Public Key Infrastructure Certificate and CRL Profile Security
RFC 2474 QoS Differentiated Services Network
RFC 2716 PPP EAP TLS Authentication Protocol Security
RFC 2743 Generic Security Service Application Program Interface v2, Update 1 Security
RFC 2782 A DNS RR for specifying the location of services (DNS SRV) Base
RFC 2818 HTTP Over TLS Base
RFC 2976 SIP INFO Method Base
RFC 2986 PKCS#10: Certificate Request Syntax Specification Security
RFC 3261 Session Initiation Protocol (SIP) Base
RFC 3262 Reliability of Provisional Responses in SIP Base
RFC 3264 An Offer/Answer Model with the Session Description Protocol (SDP) Conferencing
RFC 3265 SIP-Specific Event Notification Base
RFC 3311 SIP UPDATE Method Base
RFC 3323 A Privacy Mechanism for the Session Initiation Protocol (SIP) Base
RFC 3325 Private Extensions to the Session Initiation Protocol (SIP) for Asserted Identity within Trusted Networks Telephony
RFC 3326 The REASON Header Field for SIP Base
RFC 3327 SIP Extension Header Field for Registering Non-Adjacent Contacts Base
RFC 3350 Real-time protocol for media Media
RFC 3361 DHCP option for SIP servers Telephony
RFC 3389 Real-Time Transport Protocol (RTP) Payload for Comfort Noise (CN) Telephony
RFC 3420 Internet Media Type message/sipfrag Media
RFC 3428 Session Initiation Protocol (SIP) Extension for Instant Messaging Base
RFC 3515 SIP REFER Method Base
RFC 3550 RTP: A Transport Protocol for Real-Time Applications Media
RFC 3551 RTP Profile for Audio and Video Conferences with Minimal Control Media
RFC 3581 SIP Symmetric Response Routing Base
RFC 3605 Real Time Control Protocol (RTCP) Attribute in Session Description Protocol (SDP) Media
RFC 3611 RTP Control Protocol Extended Reports (RTCP XR) Media
RFC 3629 UTF-8, A Transformation Format of ISO 10646 Conferencing
RFC 3711 Secure real-time protocol for media  Media
RFC 3761 Telephone Number Mapping (ENUM) Telephony
RFC 3840 Indicating User Agent Capabilities in the Session Initiation Protocol (SIP) Base
RFC 3842 A Message Summary and Message Waiting Indication Event Telephony
RFC 3852 Cryptographic Message Syntax (CMS) Security
RFC 3863 Presence Information Data Format (PIDF) Base
RFC 3891 SIP REPLACES Header Telephony
RFC 3892 SIP Referred-by Mechanism Telephony
RFC 3960 Early Media and Ringing Tone Generation for SIP Telephony
RFC 3966 Tel URI for Telephone Numbers Telephony
RFC 3986 Uniform Resource Identifier (URI): Generic Syntax Base
RFC 4028 Session Timers in the Session Initiation Protocol Conferencing
RFC 4119 A Presence-based GEOPRIV Location Object Format e911
RFC 4120 The Kerberos Network Authentication Service (V5) Security
RFC 4121 The Kerberos Version 5 Generic Security Service Application Program Interface (GSS-API) Mechanism: Version 2 Security
RFC 4122 A Universally Unique Identifier (UUID) URN Namespace Base
RFC 4145 TCP-Based Media Transport in the Session Description Protocol (SDP) Media
RFC 4235 An INVITE-Initiated Dialog Event Package for SIP Base
RFC 4244 An Extension to SIP for Request History Information Base
RFC 4353 A Framework for Conferencing with the Session Initiation Protocol (SIP) Conferencing
RFC 4480 RPID: Rich Presence Extensions to the Presence Information Data Format (PIDF) Base
RFC 4559 SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows Security
RFC 4566 SDP: Session Description Protocol Media
RFC 4568 Session Description Protocol (SDP) Security Descriptions for Media Streams Media
RFC 4571 Framing Real-time Transport Protocol (RTP) and RTP Control Protocol (RTCP) Packets over Connection-Oriented Transport Media
RFC 4574 The Session Description Protocol (SDP) Label Attribute Conferencing
RFC 4575 A Session Initiation Protocol (SIP) Event Package for Conference State Conferencing
RFC 4733 RTP Payload for DTMF Digits, Telephony Tones and Telephony Signals Telephony
RFC 5139 Revised Civic Location Format for Presence Information Data Format Location Object (PIDF-LO) e911
RFC 5245 Interactive Connectivity Establishment (ICE) Media
RFC 5280 Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile Security
RFC 5389 Session Traversal Utilities for NAT (STUN) Media
RFC 5652 Cryptographic Message Syntax (CMS) Security
RFC 5766 Traversal Using Relays around NAT (TURN) Media
RFC 6797 HTTP Strict Transport Security (HSTS) Security