Thursday, December 7, 2017

Spectralink 8400 Edge Issue

I found an interesting issue when testing some Spectralink 8440 handsets the other day and I didn’t see the answer documented anywhere, so I thought I'd change that situation by blogging about it.

Note: The firmware that I was using when I ran into this issue was 5.4.4.1156. I also rolled back to a 5.3 and 5.2 version and had the same issue, so this problem may have existed for a while.

The Symptom


Outbound Call
After setting the phones up and logging in using PIN Authentication successfully when making an outbound call, the call would hang after the number was dialled. The screen would sit at the calling screen forever and nothing would happen (i.e. the dialled phone wouldn’t ring).

Outbound Call


Inbound Call
For an inbound call, the calling party (i.e. a Skype for Business client) would receive ringback tone and the call would not get displayed on the Spectralink handset. After the call forwarded timeout was reached, the call forwarded to voicemail and a missed call would appear on the Spectralink screen.
  
Inbound Call

Troubleshooting


The symptoms described above were consistent and it was clear that the SIP Signalling was working well enough to allow the device to sign in and receive information from the system. However, both inbound and outbound calls were not setting up correctly. The next port of call was to look into the logs. For an outbound call there wasn’t much information in the logs to dig into. However, for an inbound call I could see the inbound INVITE message arrive and the phone would respond with a TRYING message. At this point I could see that the inbound call was not progressing past the point of parsing the candidates from the inbound INVITE message. From this, I suspected that this was something to do with the Spectralink not being about to process the candidates correctly. I then realised that the lab system I was testing the phone on didn’t actually have an Edge server associated with it. This, of course, meant that the phone would not be getting or receiving any reflexive or relay candidates… Hhhhmmmm, interesting...

Inbound Call Log
1205143558|sip  |0|00|<<< Data received TLS
1205143558|sip  |0|00|    INVITE sip:Terry.Adams@10.22.2.11:33207;transport=tls;ms-received-cid=781300 SIP/2.0
1205143558|sip  |0|00|    Record-Route: <sip:SFB001.sfbdomain.com:5061;transport=tls;opaque=state:T:F:Ci.R781300:Ieh.Lvw6TSBMlsUoTJbFhkstQInxeS6wHgXRHMHiO5ioDln-fhNvUO1qLucUD4gO1tXpzhB_8cegAA;lr;ms-route-sig=hkx-TWiKYeik4c0hYMHXqBiJ4op9gbnpuTatBwsuD7moptXpzhB_8cegAA>;tag=B12630CFFCD2C61F74BDE5EB8A4C611A
1205143558|sip  |0|00|    Via: SIP/2.0/TLS 10.20.1.223:5061;branch=z9hG4bK8BA0D60F.E19C5E6D7DAA886D;branched=TRUE;ms-internal-info="dgFJqKHJ0AXHZY0sy2IaYnenMPK5auGe9rVA0q4_Ro3qxtXpzhVO8OYQAA"
1205143558|sip  |0|00|    Authentication-Info: TLS-DSK qop="auth", opaque="4E02C6ED", srand="4D31E5BD", snum="17", rspauth="420755234a2dbcecd21a249213ceb92d8ba9cfc5", targetname="SFB001.sfbdomain.com", realm="SIP Communications Service", version=4
1205143558|sip  |0|00|    Max-Forwards: 69
1205143558|sip  |0|00|    Content-Length: 890
1205143558|sip  |0|00|    Via: SIP/2.0/TLS 10.22.0.22:42727;branch=z9hG4bK1d5487849DAF07;ms-received-port=42727;ms-received-cid=77D300
1205143558|sip  |0|00|    P-Asserted-Identity: "Terry Adams"<sip:Terry.Adams@sfbdomain.com>,<tel:+61266591007;ext=1007>
1205143558|sip  |0|00|    From: "Terry Adams" <sip:Terry.Adams@sfbdomain.com>;tag=5C30CCBE-7E228105;epid=64167f23b38c
1205143558|sip  |0|00|    To: <sip:+61266591007@sfbdomain.com;user=phone>;epid=00907a0f09d8
1205143558|sip  |0|00|    CSeq: 1 INVITE
1205143558|sip  |0|00|    Call-ID: 0888c5534fafd0fc37bc94f7a523b38c
1205143558|sip  |0|00|    Contact: <sip:Terry.Adams@sfbdomain.com;opaque=user:epid:F5iF87H531yKmJ1oYYBMjwAA;gruu>
1205143558|sip  |0|00|    Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
1205143558|sip  |0|00|    User-Agent: Polycom/5.6.0.17325 PolycomVVX-VVX_311-UA/5.6.0.17325_64167f23b38c
1205143558|sip  |0|00|    Accept-Language: en
1205143558|sip  |0|00|    ms-subnet: 10.22.0.0
1205143558|sip  |0|00|    Allow-Events: conference,talk,hold
1205143558|sip  |0|00|    Supported: replaces
1205143558|sip  |0|00|    Supported: ms-safe-transfer
1205143558|sip  |0|00|    Supported: ms-bypass
1205143558|sip  |0|00|    Supported: ms-dialog-route-set-update
1205143558|sip  |0|00|    Supported: timer
1205143558|sip  |0|00|    Supported: 100rel
1205143558|sip  |0|00|    Supported: gruu-10
1205143558|sip  |0|00|    MS-Conversation-ID: AdNteidtM2YxYWFkN2ZiZjM0ODVhZQ==
1205143558|sip  |0|00|    Content-Type: application/sdp
1205143558|sip  |0|00|    history-info: <sip:Terry.Adams@sfbdomain.com>;index=1;ms-target-phone="tel:+61266591007;ext=1007"
1205143558|sip  |0|00|   
1205143558|sip  |0|00|    v=0
1205143558|sip  |0|00|    o=- 1512444953 1512444953 IN IP4 10.22.0.22
1205143558|sip  |0|00|    s=Polycom IP Phone
1205143558|sip  |0|00|    c=IN IP4 10.22.0.22
1205143558|sip  |0|00|    t=0 0
1205143558|sip  |0|00|    a=sendrecv
1205143558|sip  |0|00|    m=audio 5350 RTP/S
1205143558|sip  |0|00|<<< Data received TLS
1205143558|sip  |0|00|    AVP 9 112 8 0 18 101
1205143558|sip  |0|00|    a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:/u2wztfJizjOcLml2T1uN/3qiNEZpAiiPqCcyOhn|2^31|1:1
1205143558|sip  |0|00|    a=crypto:2 AES_CM_128_HMAC_SHA1_80 inline:gXAfAu4Z6VZ/1ZQYLJe3g4HAGcgwY9w4vDdlLSkJ|2^31
1205143558|sip  |0|00|    a=rtpmap:9 G722/8000
1205143558|sip  |0|00|    a=rtpmap:112 G7221/16000
1205143558|sip  |0|00|    a=fmtp:112 bitrate=24000
1205143558|sip  |0|00|    a=rtpmap:8 PCMA/8000
1205143558|sip  |0|00|    a=rtpmap:0 PCMU/8000
1205143558|sip  |0|00|    a=rtpmap:18 G729/8000
1205143558|sip  |0|00|    a=fmtp:18 annexb=no
1205143558|sip  |0|00|    a=rtpmap:101 telephone-event/8000
1205143558|sip  |0|00|    a=ice-pwd:EK5jmhsUk5xntwoCmEIEAmfT
1205143558|sip  |0|00|    a=ice-ufrag:pbdW
1205143558|sip  |0|00|    a=rtcp:5351
1205143558|sip  |0|00|    a=candidate:1 1 UDP 2130706431 10.22.0.22 5350 typ host
1205143558|sip  |0|00|    a=candidate:1 2 UDP 2130706430 10.22.0.22 5351 typ host
1205143558|sip  |0|00|    a=candidate:2 1 TCP-ACT 1684733951 10.22.0.22 5350 typ srflx raddr 10.22.0.22 rport 5350
1205143558|sip  |0|00|    a=candidate:2 2 TCP-ACT 1684733950 10.22.0.22 5350 typ srflx raddr 10.22.0.22 rport 5350
1205143558|sip  |1|00|MsgSipTcpPacket
1205143558|sip  |1|00|MsgSipTcpPacket
1205143558|sip  |3|00|CStkDialog::CreateRouteSet: transport set to top route 'TLS'
1205143558|sip  |3|00|CStkDialog::SetAddressLocal localTag set to ''
1205143558|sip  |3|00|CStkDialog::SetAddressLocal new address added of 1
1205143558|sip  |2|00|CStkDialog::CStkDialog SetAddressLocal from pRequest To: 'Terry Adams' <+61266591007@sfbdomain.com:0>
1205143558|sip  |2|00|CStkDialog::CStkDialog SetAddressLocal Config 'Terry Adams' <Terry.Adams@sfbdomain.com:0>
1205143558|sip  |2|00|CStkDialog::CStkDialog TAG 'B640E4F5-9C530CE' generated
1205143558|sip  |2|00|CStkDialog::CStkDialog local addr 'Terry Adams' <+61266591007@sfbdomain.com:0> Tag 'B640E4F5-9C530CE'
1205143558|sip  |2|00|CStkDialog::CStkDialog exit 0x9d5bf0 local list size 1
1205143558|sip  |2|00|CCallBase::IsChallenged COPIED Dialog Tag to pRequest 'B640E4F5-9C530CE'
1205143558|sip  |2|00|CCallBase::IsChallenged 'INVITE' Dialog Tag 'B640E4F5-9C530CE' pRequest Tag 'B640E4F5-9C530CE' state 'Trying'
1205143558|sip  |2|00|new UA Server INVITE trans state 'proceeding', timeout=0 (0x40d40ea8)
1205143558|sip  |3|00|CStateInviteServer::CStateInviteServer
1205143558|sip  |3|00|CStateInviteServer::CStateInviteServerHandler
1205143558|sip  |3|00|CStateInviteServer::CStateInviteServerHandler - pReplace (0x0)
1205143558|sip  |*|00|CSdp::operator << - setting m_bIsSecured == true
1205143558|sip  |3|00|CStateInviteServer::CStateInviteServerHandler - calling RemoteSdpOffer
1205143558|sip  |3|00|CStkCall::RemoteSdpOffer m_nMediaRTPPort=0
1205143558|sip  |1|00|Dialog 'id9cd7e4d4' State 'Trying'->'Early'
1205143558|sip  |1|00|signatureBuffer: <TLS-DSK><D0E0949F><11><SIP Communications Service><SFB001.sfbdomain.com><0888c5534fafd0fc37bc94f7a523b38c><1><INVITE><sip:Terry.Adams@sfbdomain.com><5C30CCBE-7E228105><sip:+61266591007@sfbdomain.com;user=phone><B640E4F5-9C530CE><sip:Terry.Adams@sfbdomain.com><tel:+61266591007;ext=1007><><100>
1205143558|sip  |1|00|doDnsListLookup(tls): doDnsSrvLookupForARecordList for '10.20.1.223' port 5061 returned 1 results
1205143558|sip  |1|00|doDnsListLookup(tls): result 0 host '' IP '10.20.1.223' port 5061 isInBound 0
1205143558|sip  |1|00|CTcp::Send(TLS) entry for address 10.20.1.223 port 5061 can Connect 0 canFailOver 1
1205143558|sip  |0|00|>>> Data Send TLS 10.20.1.223:5061
1205143558|sip  |0|00|    SIP/2.0 100 Trying
1205143558|sip  |0|00|    Via: SIP/2.0/TLS 10.20.1.223:5061;branch=z9hG4bK8BA0D60F.E19C5E6D7DAA886D;branched=TRUE;ms-internal-info="dgFJqKHJ0AXHZY0sy2IaYnenMPK5auGe9rVA0q4_Ro3qxtXpzhVO8OYQAA"
1205143558|sip  |0|00|    Via: SIP/2.0/TLS 10.22.0.22:42727;branch=z9hG4bK1d5487849DAF07;ms-received-port=42727;ms-received-cid=77D300
1205143558|sip  |0|00|    From: "Terry Adams" <sip:Terry.Adams@sfbdomain.com>;tag=5C30CCBE-7E228105;epid=64167f23b38c
1205143558|sip  |0|00|    To: "Terry Adams" <sip:+61266591007@sfbdomain.com;user=phone>;epid=00907a0f09d8;tag=B640E4F5-9C530CE
1205143558|sip  |0|00|    CSeq: 1 INVITE
1205143558|sip  |0|00|    Call-ID: 0888c5534fafd0fc37bc94f7a523b38c
1205143558|sip  |0|00|    Contact: <sip:Terry.Adams@sfbdomain.com;opaque=user:epid:x5jsdoUew1a9jiDyam965gAA;gruu>
1205143558|sip  |0|00|    Record-Route: <sip:SFB001.sfbdomain.com:5061;transport=tls;opaque=state:T:F:Ci.R781300:Ieh.Lvw6TSBMlsUoTJbFhkstQInxeS6wHgXRHMHiO5ioDln-fhNvUO1qLucUD4gO1tXpzhB_8cegAA;lr;ms-route-sig=hkx-TWiKYeik4c0hYMHXqBiJ4op9gbnpuTatBwsuD7moptXpzhB_8cegAA>;tag=B12630CFFCD2C61F74BDE5EB8A4C611A
1205143558|sip  |0|00|    User-Agent: Spectralink-SL_8440-UA/5.4.4.1156
1205143558|sip  |0|00|    Accept-Language: en
1205143558|sip  |0|00|    P-Preferred-Identity: "Terry Adams" <sip:Terry.Adams@sfbdomain.com>,<tel:+61266591007;ext=1007>
1205143558|sip  |0|00|    Authorization: TLS-DSK qop="auth", realm="SIP Communications Service", opaque="4E02C6ED", crand="D0E0949F", cnum="11", targetname="SFB001.sfbdomain.com", response="bf39acaf3c91ff5826574895f209520c0507fe35"
1205143558|sip  |0|00|    Content-Length: 0
1205143558|sip  |0|00|   
1205143558|sip  |1|00|CTcpSocket::SendData TLS queuedTxData = 0 TotalLen 1313 loop count 1 maxQueueDepth 40000
1205143558|sip  |1|00|CTcpSocket::SendData TLS Sent 1313 loop count 1
1205143558|sip  |3|00|CStkCall::NewCallState 'Unknown'->'Offering' (0x9b9b48)
1205143558|sip  |3|00|GetRemotePartyAddress from 'P-Asserted-Identity'
1205143558|sip  |3|00|CStkCall::NewCallState - BEFORE call to SipOnEvNewCall m_nMediaRTPPort=0
1205143558|ice  |0|00|soIceChannelCreate: channelId=-1 category=1 chanType=0 udpPort=2226 portTurn=2726 tcpPort=-1
1205143558|ice  |0|00|soIceRtpChanList.count=1
1205143558|ice  |2|00|soIceChannelCreate: allocated channelId 5
1205143558|ice  |0|00|soIceChannelCreate: channelId=-1 category=1 chanType=1 udpPort=2227 portTurn=2727 tcpPort=-1
1205143558|ice  |0|00|soIceRtpChanList.count=2
1205143558|ice  |2|00|soIceChannelCreate: allocated channelId 6
1205143558|ice  |0|00|soIceSessionCreate start
1205143558|ice  |0|00|    channelIdAudioRtp=5
1205143558|ice  |0|00|    enableBWManagement=0
1205143558|ice  |0|00|    bwAudioMin=64
1205143558|ice  |0|00|    bwAudioMax=64
1205143558|ice  |0|00|soIceSessionCreate - full functionality so set gatheringStunReqMaxRetransmit = 4
1205143558|ice  |0|00|soIceSessionListRemove: soIceSessionList.count=0
1205143558|ice  |0|00|soIceSessionCreate: sessEntryP (0x426d0f60) - set bInitialInvite true
1205143558|ice  |0|00|soIceSessionList.count=1
1205143558|ice  |1|00|soIceSessionCreate: linked channel (5) with session (3)
1205143558|ice  |1|00|soIceSessionCreate: linked channel (6) with session (3)
1205143558|ice  |2|00|soIceSessionCreate: allocated hSpiSession 0xb1f9d8 sessionId 3 for audio 5 6
1205143558|ice  |0|00|soIceSessionSdpGetCallAnswer
1205143558|ice  |0|00|soIceSessionSdpGetCallAnswer: len=890 pSdpInvite=
1205143558|ice  |0|00|v=0
1205143558|ice  |0|00|o=- 1512444953 1512444953 IN IP4 10.22.0.22
1205143558|ice  |0|00|s=Polycom IP Phone
1205143558|ice  |0|00|c=IN IP4 10.22.0.22
1205143558|ice  |0|00|t=0 0
1205143558|ice  |0|00|a=sendrecv
1205143558|ice  |0|00|m=audio 5350 RTP/SAVP 9 112 8 0 18 101
1205143558|ice  |0|00|a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:/u2wztfJizjOcLml2T1uN/3qiNEZpAiiPqCcyOhn|2^31|1:1
1205143558|ice  |0|00|a=crypto:2 AES_CM_128_HMAC_SHA1_80 inline:gXAfAu4Z6VZ/1ZQYLJe3g4HAGcgwY9w4vDdlLSkJ|2^31
1205143558|ice  |0|00|a=rtpmap:9 G722/8000
1205143558|ice  |0|00|a=rtpmap:112 G7221/16000
1205143558|ice  |0|00|a=fmtp:112 bitrate=24000
1205143558|ice  |0|00|a=rtpmap:8 PCMA/8000
1205143558|ice  |0|00|a=rtpmap:0 PCMU/8000
1205143558|ice  |0|00|a=rtpmap:18 G729/8000
1205143558|ice  |0|00|a=fmtp:18 annexb=no
1205143558|ice  |0|00|a=rtpmap:101 telephone-event/8000
1205143558|ice  |0|00|a=ice-pwd:EK5jmhsUk5xntwoCmEIEAmfT
1205143558|ice  |0|00|a=ice-ufrag:pbdW
1205143558|ice  |0|00|a=rtcp:5351
1205143558|ice  |0|00|a=candidate:1 1 UDP 2130706431 10.22.0.22 5350 typ host
1205143558|ice  |0|00|a=candidate:1 2 UDP 2130706430 10.22.0.22 5351 typ host
1205143558|ice  |0|00|a=candidate:2 1 TCP-ACT 1684733951 10.22.0.22 5350 typ srflx raddr 10.22.0.22 rport 5350
1205143558|ice  |0|00|a=candidate:2 2 TCP-ACT 1684733950 10.22.0.22 5350 typ srflx raddr 10.22.0.22 rport 5350
1205143558|ice  |0|00|soIceSessionSdpGetCallAnswer: RvIceSessionSDPIn returned 0
1205143558|ice  |0|00|*** sdpInpRes.eIceSupport 0
1205143558|ice  |0|00|soIceSessionSdpGetCallAnswer: entryP (0x426d0f60) bInitialInvite=1
1205143558|ice  |0|00|soIceSetLocalHostCandidates - local rtp port 2226
1205143558|ice  |0|00|soIceSetLocalHostCandidates: RvIceSessionSetLocalRtpCandidatesToAllMediaStreams returned 0
1205143558|ice  |0|00|soIceSessionSdpGetCallAnswer: RvIceSessionGatherReflexiveCandidatesEx returned=-1
1205143558|sip  |2|00|SipOnEvNewCall new call appearnce 1 SRTP key È Ô@¨ Ô@
1205143558|sip  |3|00|CStkCall::NewCallState - after call to SipOnEvNewCall m_nMediaRTPPort=2226
1205143558|sip  |2|00|SipOnEvCallNewState 9b9b48,bdb4a0 1,(null)
1205143558|sip  |3|00|CStkCall::NewCallState update held and hold flags, state 1
1205143558|sip  |3|00|CStkCall::NewCallState held 0 hold 0



The Fix!


After realising that this probably had something to do with not having an Edge server deployed on the lab system I was using, I moved the Spectralink over to another system that did have an Edge… and what do you know, the phone started working perfectly. Not having an Edge was in fact the issue. The next question was, is there any configuration that could be done on the Spectralink to make it work without an Edge? (Spoiler: Yes)

As you may or may not know, one of the main configuration items on a Spectralink (or Polycom phones which have basically the same software software forked from the same original base code) is to configure the baseProfile setting to make it run in "Lync" mode. Lync mode makes a whole raft of settings in the background on your behalf, to make your life easier. What are these settings that get made when the base profile is set to Lync mode? Well, to try and make a comparison I used a Polycom VVX running 5.6 firmware (because it was easier to get access to the settings than Spectralink) as a comparison point to see what settings the Lync profile changed in the config:

Lync Base Profile settings (in comparison to Generic mode):
call.defaultTransferType="Blind"
call.enableOnNotRegistered="0"
callLists.collapseDuplicates="0"
callLists.logConsultationCalls="1"
device.baseProfile="Lync"
dialplan.1.applyToCallListDial="0"
dialplan.1.applyToDirectoryDial="1"
dialplan.1.applyToForward="1"
dialplan.1.conflictMatchHandling="1"
dialplan.1.digitmap="x.T"
dialplan.1.digitmap.timeOut="4"
dialplan.1.impossibleMatchHandling="3"
dialplan.1.lyncDigitmap.timeOut="4"
dialplan.applyToDirectoryDial="1"
dialplan.applyToForward="1"
dialplan.applyToPstnDialing="1"
dialplan.applyToRemoteDialing="1"
dialplan.conflictMatchHandling="1"
dialplan.digitmap=""
dialplan.impossibleMatchHandling="3"
dialplan.routing.emergency.1.description=""
dialplan.routing.emergency.1.value=""
dialplan.TranslationInAutoComp="1"
dialplan.userDial.timeOut="4"
feature.btoe.enabled="1"
feature.deviceLock.enable="1"
feature.EWSAutodiscover.enabled="1"
feature.exchangeCalendar.enabled="1"
feature.exchangeCallLog.enabled="1"
feature.exchangeContacts.enabled="1"
feature.exchangeVoiceMail.enabled="1"
feature.logUpload.enabled="1"
feature.lync.abs.enabled="1"
feature.LyncCCCP2010AudioWorkaround.enabled="1"
feature.lyncSafeTransfer.enabled="1"
feature.messaging.enabled="1"
feature.moh.enabled="1"
feature.presence.enabled="1"
locInfo.source="MS_E911_LIS"
reg.1.applyServerDigitMapLocally="1"
reg.1.auth.useLoginCredentials="1"
reg.1.auth.usePinCredentials="1"
reg.1.offerFullCodecListUponResume="0"
reg.1.server.1.registerRetry.baseTimeOut="10"
reg.1.server.1.registerRetry.maxTimeOut="180"
reg.1.server.1.specialInterop="lync2010"
reg.1.server.1.transport="TLS"
reg.1.serverFeatureControl.signalingMethod="serviceMsForwardContact"
reg.1.useTelUriAsLineLabel="0"
roaming_buddies.reg="1"
sec.srtp.holdWithNewKey="0"
sec.srtp.key.lifetime="2^31"
sec.srtp.mki.enabled="1"
sec.srtp.mki.length="1"
sec.srtp.mki.startSessionAtOne="1"
sec.srtp.resumeWithNewKey="0"
sec.TLS.profileSelection.SIP="ApplicationProfile1"
server.log.setting.enabled="1"
softkey.feature.MeetNow="1"
softkey.feature.simplifiedSignIn="1"
tcpIpApp.ice.mode="MSOCS"
tcpIpApp.keepalive.tcp.sip.tls.enable="1"
tcpIpApp.port.rtp.videoPortRange.enable="1"
tcpIpApp.sntp.address="time.windows.com"
tone.dtmf.rfc2833Payload="101"
up.numOfDisplayColumns="2"
up.oneTouchDirectory="1"
up.oneTouchVoiceMail="1"
video.iFrame.delay="2"
video.iFrame.onPacketLoss="1"
voice.codecPref.G7221.24kbps="5"
voice.codecPref.G7221.32kbps="0"
voice.qualityMonitoring.rtcpxr.enable="1"
voIpProt.SIP.allowTransferOnProceeding="0"
voIpProt.SIP.considerTlsDnsEntriesOnly="1"
voIpProt.SIP.failoverOn503Response="0"
voIpProt.SIP.header.diversion.enable="1"
voIpProt.SIP.IM.autoAnswerDelay="40"
voIpProt.SIP.mtls.enable="0"
voIpProt.SIP.serverFeatureControl.cf="1"
voIpProt.SIP.serverFeatureControl.dnd="1"
voIpProt.SIP.serverFeatureControl.localProcessing.cf="0"
voIpProt.SIP.serverFeatureControl.localProcessing.dnd="0"

Based on my earlier assumption that the issue has something to do with the Edge reflexive and relay candidates, the fault was likely caused by something to do with the Microsoft specific ICE interaction. There was one setting this this sizable list that stood out to me - the tcpIpApp.ice.mode="MSOCS" setting. This setting was made specifically to handle the candidate negotiations required by Microsoft Lync/Skype for Business. After disabling this setting, guess what happened? Inbound and outbound calls started working…

TLDR Answer

When you have no Edge server deployed within your Lync/Skype for Business environment and you are deploying Spectralink phones, set the tcpIpApp.ice.mode setting to “disabled”. In a config file this might look something like this:

<!-- If there is an Edge then tcpIpApp.ice.mode="MSOCS" if there is no Edge then tcpIpApp.ice.mode="disabled" -->
<LyncBaseProfile
device.baseProfile.set="1"
device.baseProfile="Lync"
tcpIpApp.ice.mode="disabled"             
> 
</LyncBaseProfile>


The Wrap Up


Well, another day another crazy config setting. There always seems to be an endless supply of gotchas in this business and this is another one to add to your list. Till next time!





Read more →

Wednesday, November 15, 2017

Deploying Powershell Scripts with Group Policy

I have written quite a few Powershell tools for Skype for Business and some of these might be tools that people want to use on a regular basis across their Front End servers. People may want to deploy so that others within the administrative team can also use them in a simple and centrally managed way. So I thought I would write a blog post that explains a simple way to centrally deploy scripts out to multiple servers so they are easily accessible to yourself and other team members.
The method described below uses Active Directory Group Policy to control the deployment Powershell scripts across a number of Skype for Business Front End servers.

Step 1: Create a central file share where you will be storing the script files that you would like to have available on your Front End servers. In this case I created a folder named Scripts where I placed a Powershell script.



Step 2: Share the folder (Right Click on Folder-> Properties -> Sharing Tab -> Sharing…). In this case I have given Read access to everyone.

Step 3: In Active Directory Users and Computers create an OU for your Skype for Business servers. In this case I have created an OU called SfBServers and have moved all of the Skype for Business Front Ends Computer Objects to this OU.


Step 4: Open Active Directory Group Policy Management(gpmc.msc) and Right Click the SfBServersOU and “Create a GPO in this domain, and Link it here…”.



Step 5: Give the New GPO a name. In this case I have called the GPO “PowershellScripts”.

Step 6: Right Click the PowershellScripts GPO and select “Edit…”.


Step 7: Open Computer Configuration -> Preferences -> Windows Settings, Right Click Shortcuts and select New -> Shortcut.


Step 8: Fill in the shortcut properties as described below.

Action: Update
Name: VVX Manager
Target type: File System Object
Location: All Users Desktop
Target path: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Arguments: -WindowStyle Hidden -nologo -executionpolicy bypass -command "& \\ServerHostName\Scripts\Skype4B-Lync-PolycomVVXManager2.21.ps1"
Icon file path: %SystemRoot%\system32\SHELL32.dll
Icon index: 24

Powershell Arguments Breakdown:
-WindowStyle: This argument is being used to supress the Powershell window from being displayed when the script is run. I am using this deliberately because the script I am using this for has its own Windows Forms GUI that will be displayed and the Powershell window is not required. This will give the script the feeling of being more like an application.
-NoLogo: Tells the Powershell window to not show the Copyright banner - to make it that little bit quicker (or maybe not… but you never know…).
-ExecutionpPolicy: This is set to “bypass” in order to avoid the Windows server execution policy defaults that may block the script from running on the server.
-Command: Specifies the command text to execute as though it were typed at the PowerShell command prompt. In this case we are selecting to open the script file from the share that we created in Steps 1-2. You can also include any arguments for the script here if they are required.

For the Icon selection, when you click the ellipse you will get an Icon picker with  many icons to choose from. Choose the one that makes most sense for the script you are using.


Step 9: Now on the Front End server run “gpupdate /force” to get the new Group Policy pushed down to the server:


You should now get a new shortcut on the Desktop of the server that matches the one that you made in Group Policy. When you double click it you will see a command window for a second (if you chose the Window Style as Hidden like in this example) and then the Powershell GUI will be displayed:


It’s that easy! Now you can package your favourite scripts and centrally manage the version used by all users across all your servers.

The Wrap Up


I hope you found this post useful and that it allows you a better experience in using and managing your favourite Powershell scripts on your servers. Enjoy!




Read more →

Monday, August 21, 2017

Network Assessor for Skype for Business Online and Microsoft Teams

Skype for Business Online and Skype Teams are both real time communications tools that rely heavily on the networking infrastructure that they run on top of. This has always been, and will remain, a challenge in cloud deployments for the foreseeable future. In order to prepare for deploying Skype for Business Online or Microsoft Teams, you need to first ensure that your networking infrastructure will be able to handle the real-time traffic that these applications produce.

To help with this, Microsoft released a tool call the Skype for Business Network Assessment Tool. This tool runs via the command line and uses the same media stack that is used by the Skype for Business client to test Packet Loss, Jitter, Round Trip Latency and Reorder Packet Percentage on connections from your network into Microsoft’s Office 365. The audio stream created by the tool gets sent to Office 365 and then mirrored back from the closest Edge server location to your current physical location. Based on the return stream the tool is able to give accurate statistics on Packet Loss, Jitter, Round Trip Latency and Reorder Packet Percentage. This will give you an idea of the how congested the current network environment is and how well you might expect Skype for Business or Skype Teams conferences to function in your environment.

The Microsoft Network Assessment Tool is useful because it allows you to test a network before an Office 365 tenant has even been deployed and it’s also free! What the tool does lack though is the ability to easily monitor the network over a period of time and produce nicely formatted output that you can show to a manager or customer. So, I thought I would take some time and try to rectify these limitations and build a new front end for the tool…

Network Assessor


Introducing Network Assessor for Skype for Business and Microsoft Teams:



Version 1.00 Features
  • Graphs Packet Loss, Average Jitter, Latency and Reorder Ratio.
  • Zoom graphs in / out / forwards / backwards to view the data clearly.
  • Start / Stop and Pause the network tests at the click of a button.
  • Keep an eye on the status of testing using the tray icon colour by setting breach percentage thresholds. This will easily let you know that things are within your desired operating levels without having to open the interface. There are two levels of threshold breaches; one that changes the icon to orange in colour and the other that changes the icon to red in colour. These percentages are calculated on a per graph basis and if any graph breaches the percentage the colour will change.
  • Graphs will automatically highlight in red points in each of the graphs which are outside of Microsoft’s recommended bounds of operation. There are two levels for these thresholds: Client thresholds and Edge Thresholds. For more details see the Usage section below.
  • The status bar will display PASS/FAIL results for each graph. This calculation follows Microsoft's "ResultsAnalyzer.exe" PASS/FAIL calculation which is based on any graph having more than 10% of test attempts resulting in (Client or Edge) threshold breaches will equal a FAIL result.
  • You can select the frequency at which the tool will run tests. This ranges between 1 and 120 minutes (ie. Run a 17 second long test every 1 minute or up to every 2 hours).
  • Allows for graphs to be saved as PNG images for use in documentation/reports.
  • All the graphs can be shown at once or individual graphs can be selected using the “Window” menu item. Graphs are saved at the resolution that they are displayed, so opening individual graphs and then saving them can offer higher resolutions.
  • Every session that is created by the tool gets recorded in a CSV file for future reference. Sessions will “roll” to a new file based on the “Roll Time (hours)” setting in the Settings dialog. Logs can be rolled between 1 and 12 hours.
  • CSV files can be imported back in to the tool by using the File > Import CSV File menu or dragging and dropping the file onto the interface directly from Windows Explorer.
  • Supports automatic download (note: Internet connection is required for this to work) and installation of the Microsoft Network Assessment Tool and VC++ Redistributable pre-requisite by using the Help > Install Microsoft Tool menu item.
Version 1.10 Features
  • Works with Microsoft tool version 1.1.0.0 released on 5/3/2018
  • Support Connectivity Check. Select "File > Connectivity Check"
  • Supports new Microsoft tool installation procedure
  • The Microsoft Tool in its latest incarnation doesn’t handle all exceptions that it throws. These seem to be mostly around when it does the initial lookup REST call where it gets a JSON list of the servers to connect to for testing. If DNS fails or there is no network interface available on the machine the Microsoft tool throws an unhandled exception. If this happens the Network Assessor GUI will report an error and stop running tests. 
  • Be careful when trying to manually install the new 5/3/2018 version of the Microsoft Command Line tool because it does not install properly over the top of previous version (i.e. it doesn't install over it and still says that installation was successful).


Note: This tool is not intended for load/stress testing!



Prerequisites


Tested with version 1.1.0.0 released on 5/3/2018 of the Microsoft Skype for Business Network Assessment Tool (LINK: https://www.microsoft.com/en-us/download/details.aspx?id=53885).

Network Assessor requires the following:
  • At least .NET 4.5 must be installed on the PC to run the tool. (Windows 8 / Windows Server 2012 and above will support this by default. If you are using earlier operating systems the installer will download .net for you)
  • Do not run the tool on a machine with multiple interfaces. Microsoft’s Network Assessment Tool may fail due to sending traffic out the wrong interface.
  • When run on Windows Server, Microsoft’s command line tool needs “Media Foundation” (for Windows 2012, 2012 R2) or “Desktop Experience” (Windows 2008 R2) installed when running on Windows Server. These can be installed via the Server Manager interface or through Powershell:

Windows Server 2008 R2 (Desktop Experience install):
Import-Module ServerManager
Add-WindowsFeature Desktop-Experience

Windows Server 2012 or 2012 R2 (Media Foundation install):
Add-WindowsFeature Server-Media-Foundation
Note: This is not documented in Microsoft’s documentation but is required.

Microsoft’s command line tool and pre-reqs can be can automatically downloaded and installed using the Help > Install Microsoft Tool…menu directly in the Network Assessor interface. For manual offline installation of Microsoft’s Tool, install the following:
  • Microsoft’s command line tool
  • You must uninstall any old version of the tool before installing a newer version. The installer does not warn about this and fails to install over the top of existing versions.
Note: Microsoft’s tool should be left with all of the default settings in its config file.


Firewall Requirements:

The tool needs to be able to send traffic to Office 365 in order to work. The following ports are required to be allowed on firewalls between the Network Assessor tool and Office 365:
  • TCP Source Ports: 50000 - 50019
  • TCP Destination Port: 443
  • UDP Source Ports: 50000 - 50019
  • UDP Destination Port: 3478

Network Assessment Procedures:

For more procedural details on how to do Network Assessments, please refer to the Skype Operations Framework. There is a lot of useful documentation in the Determine Network Readiness section of Planning stage within this framework and should give you a good starting point for running Network Readiness assessments.


Usage Details


Walkthrough Video:



Main Window Settings



The “Run Every x Mins” setting controls how often the network assessment tool will be run and log results. This value can be set between 1 minute and 2 hours.

The Thresolds setting refers to two levels of thresholds that are recommend by Microsoft for real time audio for the statistics that are generated by the Network Assessment Tool. The first is the “Edge” values which are recommended for when you are testing from your perimeter network into Office 365. The second is recommended thresholds when testing from a “Client” subnet. The Edge values are lower and more restrictive than the client subnet because is expected that the client subnet will have more hops to get to Office 365 than the Edge.

Customer Edge to Microsoft Edge Thresholds:
Metric
Target
Latency (RTT)
< 60ms
Packet loss
<0.1% during any 15s interval
Note: The value output by the Microsoft tool is not a percentage.
Packet inter-arrival Jitter
<15ms during any 15s interval
Packet reorder
<0.01% out-of-order packets
Note: The value output by the Microsoft tool is not a percentage.

Client to Microsoft Edge Thresholds:
Metric
Target
Latency (RTT or Round-trip Time)
< 100ms
Packet loss
<1% during any 15s interval
Note: The value output by the Microsoft tool is not a percentage.
Packet inter-arrival Jitter
<30ms during any 15s interval
Packet reorder
<0.05% out-of-order packets
Note: The value output by the Microsoft tool is not a percentage.


Settings Window:


The tool has the following settings:



Network Assessment Tool Location: This is the location of the Skype for Business Network Assessment Command Line Tool on the system. If you have manually downloaded the tool and unzipped it to a folder on the system you can enter the location via the Browse button.
Session Log Folder: The Session Logs by default are placed on the system in the “C:\Users\<Username>\AppData\Roaming\NetworkAssessor\SessionLogs” folder. If for some reason you would like to change this folder (perhaps for centralizing the logs on a file share) you can select a new folder here.
Red Level Breach Percentage: This is the percentage of breaches (on a per graph basis) that has to occur for the task bar icon to change to red colour.
Orange Level Breach Percentage: This is the number of breaches (on a per graph basis) that has to occur for the task bar icon to change to orange colour.
Turn Off Minimise Notification: When this check box is ticked it will turn off the task bar notifications.
Auto Scroll Graph: When this check box is ticked it means that the graphs will automatically scroll when new points are added to it graph.
Roll Time (Hours): This is the number of hours of testing that will be logged to CSV until a new session log file is created. When the file rolls the graphs will also be cleared. This is to try and maintain the performance of the graphs. Also, when the graph is cleared the breach counters will also be cleared.

The Wrap Up


Hopefully this post will give you another tool in the toolbox to help you in your preparation for deploying Skype for Business Online or Microsoft Teams in your environment. If you have any comments or issues with the tool please provide feedback below.



Read more →