Search This Blog

Tuesday, November 19, 2013

Modified BAT Script to use for CLS - originally from R. Brynteson

REM By Richard Brynteson
REM Avtex
REM 2012
REM some modifications Lambert Consulting
REM run as admin to avoid snooper crach, if it is still crashing - reinstall Lync debug tools

CD "C:\Program Files\Common Files\Microsoft Lync Server 2013\ClsAgent"
goto menu
echo What would you like to trace?
echo 1 Incoming and Outgoing Calls
echo 2 Address Book
echo 3 Application Sharing
echo 4 Audio Video Conferencing Issue
echo 5 Conferencing Auto Attendant
echo 6 Call Park
echo 7 CLS Logging
echo 8 Device Update
echo 9 Hosted Migration
echo 10 Hybrid Voice
echo 11 Instant Messaging and Presence
echo 13 LILR Legacy
echo 14 LILR Lyss
echo 15 Lyss and UCS
echo 16 Media Connectivity
echo 17 Meeting Join
echo 18 Monitoring and Archiving
echo 19 Response Group
echo 20 SP
echo 21 User Replication
echo 22 Voice Mail
echo 23 WAC
echo 24 XMPP
echo 25 Always On
echo 26 Quit
set /P C=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]?
if "%C%"=="26" goto quit
if "%C%"=="25" goto alwayson
if "%C%"=="24" goto xmpp
if "%C%"=="23" goto wac
if "%C%"=="22" goto voicemail
if "%C%"=="21" goto user
if "%C%"=="20" goto sp
if "%C%"=="19" goto rgs
if "%C%"=="18" goto monarc
if "%C%"=="17" goto meeting
if "%C%"=="16" goto media
if "%C%"=="15" goto lyssanducs
if "%C%"=="14" goto lilrlyss
if "%C%"=="13" goto lilrlegacy
if "%C%"=="12" goto im
if "%C%"=="10" goto hybrid
if "%C%"=="9" goto hosted
if "%C%"=="8" goto device
if "%C%"=="7" goto clslog
if "%C%"=="6" goto callpark
if "%C%"=="5" goto conf
if "%C%"=="4" goto av
if "%C%"=="3" goto appsharing
if "%C%"=="2" goto addressbook
if "%C%"=="1" goto inoutcalls
goto choice
set log=AlwaysOn
goto trace
set log=XMPP
goto trace
set log=WAC
goto trace
set log=VoiceMail
goto trace
set log=UserReplicator
goto trace
set log=sp
goto trace
set log=RGS
goto trace
set log=MonitoringAndArchiving
goto trace
set log=MeetingJoin
goto trace
set log=MediaConnectivity
goto trace
set log=HostedMigration
goto trace
set log=LYSSAndUCS
goto trace
set log=LILRLYSS
goto trace
set log=LILRLegacy
goto trace
set log=IMandPresence
goto trace
set log=HybridVoice
goto trace
set log=DeviceUpdate
goto trace
set log=cls
goto trace
set log=CPS
goto trace
set log=CAA
goto trace
set log=IncomingAndOutgoingCall
goto trace
set log=ApplicationSharing
goto trace
set log=AudioVideoConferencingIssue
goto trace
set log=AddressBook
goto trace
ClsController.exe -start -scenario %log%
ECHO Logging has been enabled.  Reproduce your issue now.
ClsController.exe -stop -scenario %log%
ClsController.exe -flush
ECHO Logging has been disabled.
Set TDate=CLS_%date:~4,2%-%date:~7,2%-%date:~10,4%_%time:~0,2%%time:~3,2%_%time:~6,5%.txt
ClsController.exe -search -loglevel verbose > %userprofile%\desktop\%Tdate%
"C:\Program Files\Microsoft Lync Server 2013\Debugging Tools\Snooper.exe" %userprofile%\desktop\%Tdate%
@rem ===== BATCH SCRIPT END =====

Monday, November 18, 2013

Microsoft Lync Connectivity Analyzer on Windows 7 has stopped working

If you have Lync Connectivity Analyzer crashing in Windows 7 (32bit) try to remove KB2840642V2 update.

Saturday, November 16, 2013

Lync to Skype federation requires provisioning from Microsoft side

Some other notes that I can add:

Skype may not like SHA256 (SHA-2) signature on the endge certificate. Check if you can reissue your public certificate with SHA1 (less secure).

Note that egde must trust  "Baltimore CyberTrust Root" as this is what Skype uses.

It may take another 2 weeks after you get email from Microsofdt that provisioning is finished.

Do not forget to enable

Set-CsMediaConfiguration -EncryptionLevel SupportEncryption
Set-CsExternalAccessPolicy Global -EnablePublicCloudAccess $true -EnablePublicCloudAudioVideoAccess $true

as exaplained at

Saturday, November 9, 2013

Lync clients logs path

Lync 2013 Desktop 


Lync 2010 Desktop  


AppStore Lync Client

C:\Users\\AppData\Local\Packages\Microsoft.LyncMX_8wekyb3d8bbwe\ LocalState\Tracing\LyncImm-Lync-0.Lynclog

LWA plug-in 


Friday, November 8, 2013

Troubleshooting lync voice routing

Several links that helped me to create voice routes in Lync 2013

Special note for slide 20:
Multiple routes in the same usage
• Gateway selected based on matching pattern.If multiple routes match, do not rely on route ordering for enforcing preference.
So even if Voice route test in Lync Contorl panel indicates that route works, you may see that FrontEnd may decide differently. When you trace SIP session you may observe that PhoneRoute is not exactly what you expected:

TL_INFO(TF_PROTOCOL) [pool\fe6]1830.044C::11/08/2013-21:40:09.582.00000175 (SIPStack,SIPAdminLog::ProtocolRecord::Flush:ProtocolRecord.cpp(265)) [758279003]
Trace-Correlation-Id: 758279003
Instance-Id: 19D8
Direction: outgoing;source="local"
Peer: pool.corp:59325
Message-Type: response
Start-Line: SIP/2.0 101 Progress Report
From: "testlync13";tag=d9096ad6cd;epid=586928041f
Call-ID: d58bfea8e1c34bed887ce915bfc89be5
Via: SIP/2.0/TLS yyy:59325;branch=z9hG4bK69EC0823.DE3BF7E7D064C968;branched=FALSE;ms-received-port=59325;ms-received-cid=2E200
Via: SIP/2.0/TLS zzz:57226;branch=z9hG4bK2C19BD82.033C499B38802969;branched=FALSE;ms-received-port=57226;ms-received-cid=141A100
Via: SIP/2.0/TLS;received=xxx;ms-received-port=58378;ms-received-cid=3449B00
Content-Length: 0
ms-diagnostics: 12006;reason="Trying next hop";source="";PhoneUsage="National numbers (0xx xxx xx xx)";PhoneRoute="National numbers (0xx xxx xx xx) (Pool UX1)";Gateway="gw1.corp";appName="OutboundRouting"

The solution is to make sure there is one route for a pattern in a PSTNUsage. For that you may need to create another voice policy + PSTNUsage for users and map to the correct route.

Here is another linc that talk about troubleshooting in general:

And banch of tools that help:


Friday, November 1, 2013

Lync 2013 client address book sycnronisation

Newly enabled Lync 2013 client have a random delay 1-59 minutes to start downloading GAL. While it is not ready you may see the message "Address book is syncronising". You can force update as explained here.