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 - 209.xx.xxx.xxx:443 (From Local Address: 10.0.0.2:55072) 793 bytes:
10/18/2011|12:23:30.127 1674:2350 INFO  :: REGISTER sip:contoso.com SIP/2.0
Via: SIP/2.0/TLS 10.0.0.2:55072

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 http://msdn.microsoft.com/en-us/library/cc307282(v=office.12).aspx.  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 http://tools.ietf.org/html/rfc1321
RFC 2045 Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies Conferencing http://tools.ietf.org/html/rfc2045
RFC 2104 HMAC: Keyed-Hashing for Message Authentication Security http://tools.ietf.org/html/rfc2104
RFC 2111 Content-ID and Message-ID Uniform Resource Locators Telephony http://tools.ietf.org/html/rfc2111
RFC 2118 Microsoft Point-To-Point Compression (MPPC) Protocol Base http://tools.ietf.org/html/rfc2118
RFC 2132 DHCP Options and BOOTP Vendor Extensions Base http://tools.ietf.org/html/rfc2132
RFC 2141 URN Syntax Base http://tools.ietf.org/html/rfc2141
RFC 2190 RTP Payload Format for H.263 Video Streams Media http://tools.ietf.org/html/rfc2190
RFC 2198 RTP Payload for Redundant Audio Data Media http://tools.ietf.org/html/rfc2198
RFC 2246 The TLS Protocol Version 1.0 Security http://tools.ietf.org/html/rfc2246
RFC 2315 PKCS #7: Cryptographic Message Syntax Version 1.5 Security http://tools.ietf.org/html/rfc2315
RFC 2459 Internet X.509 Public Key Infrastructure Certificate and CRL Profile Security http://tools.ietf.org/html/rfc2459
RFC 2474 QoS Differentiated Services Network http://tools.ietf.org/html/rfc2474
RFC 2716 PPP EAP TLS Authentication Protocol Security http://tools.ietf.org/html/rfc2716
RFC 2743 Generic Security Service Application Program Interface v2, Update 1 Security http://tools.ietf.org/html/rfc2743
RFC 2782 A DNS RR for specifying the location of services (DNS SRV) Base http://tools.ietf.org/html/rfc2782
RFC 2818 HTTP Over TLS Base http://tools.ietf.org/html/rfc2818
RFC 2976 SIP INFO Method Base http://tools.ietf.org/html/rfc2976
RFC 2986 PKCS#10: Certificate Request Syntax Specification Security http://tools.ietf.org/html/rfc2986
RFC 3261 Session Initiation Protocol (SIP) Base http://tools.ietf.org/html/rfc3261
RFC 3262 Reliability of Provisional Responses in SIP Base http://tools.ietf.org/html/rfc3262
RFC 3264 An Offer/Answer Model with the Session Description Protocol (SDP) Conferencing http://tools.ietf.org/html/rfc3264
RFC 3265 SIP-Specific Event Notification Base http://tools.ietf.org/html/rfc3265
RFC 3311 SIP UPDATE Method Base http://tools.ietf.org/html/rfc3311
RFC 3323 A Privacy Mechanism for the Session Initiation Protocol (SIP) Base http://tools.ietf.org/html/rfc3323
RFC 3325 Private Extensions to the Session Initiation Protocol (SIP) for Asserted Identity within Trusted Networks Telephony http://tools.ietf.org/html/rfc3325
RFC 3326 The REASON Header Field for SIP Base http://tools.ietf.org/html/rfc3326
RFC 3327 SIP Extension Header Field for Registering Non-Adjacent Contacts Base http://tools.ietf.org/html/rfc3327
RFC 3350 Real-time protocol for media Media http://tools.ietf.org/html/rfc3350
RFC 3361 DHCP option for SIP servers Telephony http://tools.ietf.org/html/rfc3361
RFC 3389 Real-Time Transport Protocol (RTP) Payload for Comfort Noise (CN) Telephony http://tools.ietf.org/html/rfc3389
RFC 3420 Internet Media Type message/sipfrag Media http://tools.ietf.org/html/rfc3420
RFC 3428 Session Initiation Protocol (SIP) Extension for Instant Messaging Base http://tools.ietf.org/html/rfc3428
RFC 3515 SIP REFER Method Base http://tools.ietf.org/html/rfc3515
RFC 3550 RTP: A Transport Protocol for Real-Time Applications Media http://tools.ietf.org/html/rfc3550
RFC 3551 RTP Profile for Audio and Video Conferences with Minimal Control Media http://tools.ietf.org/html/rfc3551
RFC 3581 SIP Symmetric Response Routing Base http://tools.ietf.org/html/rfc3581
RFC 3605 Real Time Control Protocol (RTCP) Attribute in Session Description Protocol (SDP) Media http://tools.ietf.org/html/rfc3605
RFC 3611 RTP Control Protocol Extended Reports (RTCP XR) Media http://tools.ietf.org/html/rfc3611
RFC 3629 UTF-8, A Transformation Format of ISO 10646 Conferencing http://tools.ietf.org/html/rfc3629
RFC 3711 Secure real-time protocol for media  Media http://tools.ietf.org/html/rfc3711
RFC 3721 Telephone Number Mapping (ENUM) Telephony http://tools.ietf.org/html/rfc3721
RFC 3840 Indicating User Agent Capabilities in the Session Initiation Protocol (SIP) Base http://tools.ietf.org/html/rfc3840
RFC 3842 A Message Summary and Message Waiting Indication Event Telephony http://tools.ietf.org/html/rfc3842
RFC 3852 Cryptographic Message Syntax (CMS) Security http://tools.ietf.org/html/rfc3852
RFC 3863 Presence Information Data Format (PIDF) Base http://tools.ietf.org/html/rfc3863
RFC 3891 SIP REPLACES Header Telephony http://tools.ietf.org/html/rfc3891
RFC 3892 SIP Referred-by Mechanism Telephony http://tools.ietf.org/html/rfc3892
RFC 3960 Early Media and Ringing Tone Generation for SIP Telephony http://tools.ietf.org/html/rfc3960
RFC 3966 Tel URI for Telephone Numbers Telephony http://tools.ietf.org/html/rfc3966
RFC 3986 Uniform Resource Identifier (URI): Generic Syntax Base http://tools.ietf.org/html/rfc3986
RFC 4028 Session Timers in the Session Initiation Protocol Conferencing http://tools.ietf.org/html/rfc4028
RFC 4119 A Presence-based GEOPRIV Location Object Format e911 http://tools.ietf.org/html/rfc4119
RFC 4120 The Kerberos Network Authentication Service (V5) Security http://tools.ietf.org/html/rfc4120
RFC 4121 The Kerberos Version 5 Generic Security Service Application Program Interface (GSS-API) Mechanism: Version 2 Security http://tools.ietf.org/html/rfc4121
RFC 4122 A Universally Unique Identifier (UUID) URN Namespace Base http://tools.ietf.org/html/rfc4122
RFC 4145 TCP-Based Media Transport in the Session Description Protocol (SDP) Media http://tools.ietf.org/html/rfc4145
RFC 4235 An INVITE-Initiated Dialog Event Package for SIP Base http://tools.ietf.org/html/rfc4235
RFC 4244 An Extension to SIP for Request History Information Base http://tools.ietf.org/html/rfc4244
RFC 4353 A Framework for Conferencing with the Session Initiation Protocol (SIP) Conferencing http://tools.ietf.org/html/rfc4353
RFC 4480 RPID: Rich Presence Extensions to the Presence Information Data Format (PIDF) Base http://tools.ietf.org/html/rfc4480
RFC 4559 SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows Security http://tools.ietf.org/html/rfc4559
RFC 4566 SDP: Session Description Protocol Media http://tools.ietf.org/html/rfc4566
RFC 4568 Session Description Protocol (SDP) Security Descriptions for Media Streams Media http://tools.ietf.org/html/rfc4568
RFC 4571 Framing Real-time Transport Protocol (RTP) and RTP Control Protocol (RTCP) Packets over Connection-Oriented Transport Media http://tools.ietf.org/html/rfc4571
RFC 4574 The Session Description Protocol (SDP) Label Attribute Conferencing http://tools.ietf.org/html/rfc4574
RFC 4575 A Session Initiation Protocol (SIP) Event Package for Conference State Conferencing http://tools.ietf.org/html/rfc4575
RFC 4733 RTP Payload for DTMF Digits, Telephony Tones and Telephony Signals Telephony http://tools.ietf.org/html/rfc4733
RFC 5139 Revised Civic Location Format for Presence Information Data Format Location Object (PIDF-LO) e911 http://tools.ietf.org/html/rfc5139
RFC 5245 Interactive Connectivity Establishment (ICE) Media http://tools.ietf.org/html/rfc5245
RFC 5280 Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile Security http://tools.ietf.org/html/rfc5280
RFC 5389 Session Traversal Utilities for NAT (STUN) Media http://tools.ietf.org/html/rfc5389
RFC 5652 Cryptographic Message Syntax (CMS) Security http://tools.ietf.org/html/rfc5652
RFC 5766 Traversal Using Relays around NAT (TURN) Media http://tools.ietf.org/html/rfc5766