I was on-the-ball with Lync Mobility. Literally the day Microsoft released the code is the day I had it up and running. Everything is working fine for us across all platforms (iOS, Android, WP7). However, push notifications failed 100% of the time for iOS and WP7 clients.
I spent some time digging in to it this week and made little progress. Everything looked to have been set up correctly according to the Microsoft Lync Mobility documentation. Before now, we have never enabled or used federation so I figured something was not set up right on my end, but I just couldn’t find it.
I got the following errors when running the Test-CsFederatedPartner command:
Test-CsFederatedPartner -TargetFqdn lyncsip.flinchböt.com -Domain push.lync.com -ProxyFqdn sipfed.online.lync.com
Test-CsFederatedPartner : No matching cluster found in topology. At line:1 char:24 + Test-CsFederatedPartner <<<< -TargetFqdn lyncsip.flinchböt.com -Domain push.lync.com -ProxyFqdn sipfed.online.lync.com + CategoryInfo : ResourceUnavailable: (:) [Test-CsFederatedPartner], InvalidOperationException + FullyQualifiedErrorId : NoMatchingClusterFound,Microsoft.Rtc.Management. SyntheticTransactions.TestFederatedPartnerCmdlet
I ran a trace on our Edge server and all I saw was the following four lines:
TL_INFO(TF_PROTOCOL) 0DF8.0348::01/17/2012-18:38:36.716.00032fe7 (SIPStack,SIPAdminLog::TraceProtocolRecord:SIPAdminLog.cpp(125))$$begin_record Trace-Correlation-Id: 2566608249 Instance-Id: 000C38E3 Direction: incoming;source="internal edge";destination="external edge" Peer: Lync-Pool1.flinchböt.com:50152 Message-Type: request Start-Line: OPTIONS sip:Options_User@push.lync.com SIP/2.0 From: ;epid=4DCAD82E1E;tag=e08772b84a To: CSeq: 1 OPTIONS Call-ID: 30ce60a4c9ef4acb8e6faa1d225e7368 MAX-FORWARDS: 70 VIA: SIP/2.0/TLS 172.17.111.217:50152;branch=z9hG4bKd5a9251d ROUTE: ;ms-edge-route CONTACT: CONTENT-LENGTH: 0 USER-AGENT: RTCC/184.108.40.206 Message-Body: – $$end_record
TL_ERROR(TF_DIAG) 0DF8.0348::01/17/2012-18:38:37.794.00036775 (SIPStack,SIPAdminLog::TraceDiagRecord:SIPAdminLog.cpp(143))$$begin_record LogType: diagnostic Severity: error Text: Message was not sent because the connection was closed SIP-Start-Line: OPTIONS sip:Options_User@push.lync.com SIP/2.0 SIP-Call-ID: 30ce60a4c9ef4acb8e6faa1d225e7368 SIP-CSeq: 1 OPTIONS Peer: sipfed.online.lync.com:5061 $$end_record
TL_INFO(TF_PROTOCOL) 0DF8.0348::01/17/2012-18:38:37.794.00036a3c (SIPStack,SIPAdminLog::TraceProtocolRecord:SIPAdminLog.cpp(125))$$begin_record Trace-Correlation-Id: 2566608249 Instance-Id: 000C38EF Direction: outgoing;source="local";destination="internal edge" Peer: Lync-Pool1.flinchböt.com:50152 Message-Type: response Start-Line: SIP/2.0 504 Server time-out From: ;epid=4DCAD82E1E;tag=e08772b84a To: ;tag=A72C77DEDECC1EB69BC84F0272A958A8 CSeq: 1 OPTIONS Call-ID: 30ce60a4c9ef4acb8e6faa1d225e7368 Via: SIP/2.0/TLS 172.17.111.217:50152;branch=z9hG4bKd5a9251d;ms-received-port=50152;ms-received-cid=BE300 ms-diagnostics: 1046;reason="Failed to connect to a federated peer server";WinsockFailureCode="10061(WSAECONNREFUSED)";WinsockFailureDescription="The peer actively refused the connection attempt";Peer="sipfed.online.lync.com";Port="5061";source="lyncsip.flinchböt.com" Server: RTC/4.0 Content-Length: 0 ms-edge-proxy-message-trust: ms-source-type=EdgeProxyGenerated;ms-ep-fqdn=csedge.flinchböt.com;ms-source-verified-user=verified Message-Body: – $$end_record
TL_WARN(TF_DIAG) 0DF8.0348::01/17/2012-18:38:37.794.00036a8b (SIPStack,SIPAdminLog::TraceDiagRecord:SIPAdminLog.cpp(145))$$begin_record LogType: diagnostic Severity: warning Text: Routing error occurred; check Result-Code field for more information Result-Code: 0xc3e93c7f SIPPROXY_E_ROUTING_MSG_SEND_CLOSED SIP-Start-Line: OPTIONS sip:Options_User@push.lync.com SIP/2.0 SIP-Call-ID: 30ce60a4c9ef4acb8e6faa1d225e7368 SIP-CSeq: 1 OPTIONS Peer: sipfed.online.lync.com:5061 $$end_record
So basically, all this says is that it couldn’t connect to push.lync.com but I didn’t know WHY. We allow all outbound traffic on our upstream firewall…I thought. But what I was missing is that we DON’T! I am not the firewall admin so I just go by what people tell me or what I think I heard. Apparently, I heard wrong.
Come to find out our firewall was blocking port 5061 outbound so we could never establish a SIP connection with the online.sipfed.lync.com. Without that connection, federation didn’t work and without federation, push notifications didn’t work.
After our firewall guy opened up port 5061 outbound for our Edge servers, Lync Mobile push notifications began working like a champ!