Friday, 24 January 2014

Lync Environment Report - Visio and Word Report of Existing Environment

This package of PowerShell scripts will gather data on a Lync deployment environment and store it into an XML data file. You can also create Microsoft Word reports and Microsoft Visio network diagrams based upon the data gathered.

http://gallery.technet.microsoft.com/Lync-Environment-Report-cbc6fb1a


Thursday, 23 January 2014

Lync Snooper 2013 does not parse logs correctly unless machine region is EN-US - ERROR: Illegal character from S4 trace

Lync Snooper 2013 does not parse logs correctly unless machine region is EN-US  -

http://lyncdup.com/2013/06/lync-snooper-2013-does-not-parse-logs-correctly-unless-machine-region-is-en-us/

Snooper.exe would open the captures successfully, but you would see the following messages:
TL_ERROR(TF_COMPONENT) [0]12E0.201C::06/16/2013-08:07:35.116.00000d8a (S4,SipMessage.CheckNonAscii:1823.idx(809))Illegal character from S4 trace. Count:95

I can confirm that this has now been resolved in the latest version of the Lync Debugging Tools found here.


Wednesday, 22 January 2014

Removing a "stuck" call from Lync Response Group Service

Occasionally Lync fails to remove a Response Group call from the database once the call is completed.

You can delete the stuck record from the "rgsdyn.MatchRequests" table directly on the SQL server:

1. Right-click the table and edit top 200 rows
2. Find stuck record and then delete

It is best to do this after hours or while there are no other active calls so you will only see a single stuck record.

You also can run the command "DELETE FROM [rgsdyn].[dbo].[MatchRequests];" to delete all records from the table. If there are many records (as all active calls in Lync are listed in this database), you can identify your one by the QueueId; look at "rgsconfig.Queues" table to see which id your queue has.

Run Lync Cmdlets Offline

Cool script by Vikas which allows you to run get-cs* commands against an exported XML's (export-clixml) from Lync server.

http://www.allthingsuc.co.uk/run-lync-cmdlets-offline/


Understanding the Lync Response Group Abandoned Calls Report

The statistics provided in the Response Group Usage Report are a little misleading without understanding the definitions. An abandoned call doesn't necessarily mean the caller has hung up in frustration or been disconnected, only that the call was not answered by an agent. This can happen because a queue timeout/ overflow or workflow transfer has occurred, which transfers the call outside of the Repose Group Service. For example the call maybe transferred to an Exchange IVR, a users voice mail, or an outside number. The transferred call may still in fact be answered further down the chain, however the Response Group Service has no visibility to report on this.


  • Received calls - Total number of calls received by all instances of the Response Group application.
  • Successful calls - Total number of calls that were picked up by the Response Group application.
  • Offered calls -Total number of calls that were transferred to a Response Group agent.
  • Answered calls - Total number of calls that were actually answered by a Response Group agent.
  • Percentage of abandoned calls - Percentage of calls that were received by the Response Group application but were never answered by an agent. This value is calculated by subtracting the Answered calls from the Received calls, and then dividing that value by the number of Received calls. For example, if you received 10 calls and 7 were answered, you would subtract 7 from 10, leaving 3 unanswered calls. That value would then be divided by 10, giving you an abandoned call percentage of 30%.
  • Transferred calls - Total number of Response Group calls that were transferred because of a queue timeout or queue overflow.

Lync 2013 Bandwidth Guide

A common question that customers ask is "What is the minimum bandwidth required for a Lync Device to operate?" This is very difficult to say as there are many components that use varying amounts of bandwidth. I use the follow as a general guide:

Audio 11.8 - 223.6 Kbps
Typical Averages
Peer to Peer 29.3 or 39.8 Kbps (RTAudio Wideband vs RTAudio Narrowband)
Conferencing 25.5 or 46.1 Kbps (Siren vs G.722)
PSTN: 30.9 or 64.8 Kbps (RTAudio Narrowband vs G.711)

Video 15 – 4000 Kbps
Typical Averages
Peer to Peer 460 Kbps (H.264)
Conferencing: 270 Kbps video send/260 Kbps video receive (H.264 or RTVideo)

Control Signaling 5 – 15 Kbps

So take calls to the PSTN as an example – 64.8Kbps (max PSTN bandwidth) x 3600sec (1 hour total talk time per day) x 31days (over 1 month) / 1,048,576 (number of Kbps in 1 GB) =  6.9GB per month.

For further technical details see - http://technet.microsoft.com/en-us/library/jj688118.aspx

Monday, 20 January 2014

Disabling a User in AD Does Not Disable the User In Lync

Great article by Jeff Guillet on why disabling a Lync user in AD may not stop the user logging in for up to 180 days, and some useful PowerShell by Pat Richard to help find such users.


Wednesday, 15 January 2014

Lync Server 2013 Centralised Logging Service

CLSController
Managed using ClsController.exe. Run this from the command prompt with elevated permissions which have access to the Lync CMS.

Ports 50001, 50002 and 50003 need to be open on each server. This should be configured in Windows Firewall automatically during installation, however the Edge server for example will need some holes from the DMZ to Internal.

C:\Program Files\Common Files\Microsoft Lync Server 2013\ClsAgent\ClsController.exe

The typical sequence of commands you want to run are:

ClsController.exe -start –scenario <scenario> –pools <pool fqdn>
Repro issue
ClsController.exe -stop –scenario <scenario> –pools <pool fqdn>
ClsController.exe  -flush –pools <pool fqdn>
ClsController.exe  -search –pools <pool fqdn> –components <component> –loglevel <loglevel>

Scenario Comparisons

Description
Centralised Logging Tool Scenario
Lync 2010 Logging Tool Components
AlwaysOn is a special scenario that can be enabled to log all the time. The AlwaysOn scenatio can run in conjunction with one other scenario.


AlwaysOn
AsMcu
AcpMcu
AVMCU
AVMP
BICommon
BICOSMOS
BIDATACOLLECTOR
CAAServer
Collaboration
DataMCU
DataMcuRuntime
ExumRouting
IMMCU
InboundRouting
InterClusterRouting
McuInfra
MediationServer
OutboundRouting
Routing_Data_Sync_Agent
S4
ServerTransportAdaptor
Sipstack
LDM
AppShareOoty
RDPApiTrace
RDPEncComTrace
RdpApiTrace
UserServices
UDCAgent
PNCHService
TenantAdminUI
HostedMigration
Powershell
UCWA
ChatCommon
ChatEndpoint
ChatServer
ChatCompliance
ChatWebService
XmppTGW
XmppCommonLibrary
XmppListener
XmppRouting
XmppTGWProxy
Lyss
StoreWeb
TranslationApplication
RgsClientsLib
RgsCommonLibrary
RgsDatastores
RgsDiagnostics
RgsHostingFramework
RgsMatchMakingService
CpsDiagnostics
CpsHostingFramework
JoinLauncher
WebInfrastructure
Infrastructure
InternalCommon
McxService
UserPinService
CertProvisioning
BackupService
RtcDbSyncAgent
WebRelay
ServerAgent
Media related logging
MediaConnectivity
MediaStack_AUDIO_AGC
MediaStack_AUDIO_DRC
MediaStack_AUDIO_ECHODT
MediaStack_AUDIO_FAXDT
MediaStack_AUDIO_HEALER
MediaStack_AUDIO_NOISEDT
MediaStack_AUDIO_VAD
MediaStack_AUDIO_VSP
MediaStack_AudioCodecs
MediaStack_AudioEngine
MediaStack_COMAPI
MediaStack_COMMON
MediaStack_Crossbar
MediaStack_Crypto
MediaStack_DebugUI
MediaStack_DebugUI_AEC
MediaStack_DEVICE
MediaStack_MassConvertedTraces1
MediaStack_MediaManager
MediaStack_PerFrame
MediaStack_PerPacket
MediaStack_QualityController
MediaStack_RTCP
MediaStack_RTP
MediaStack_StreamingEngine
MediaStack_TLS
MediaStack_Transport
MediaStack_VIDEO
MediaStack_VOICEENHANCE
Application Sharing
ApplicationSharing
AsMcu
AppShareOoty
ServerTransportAdaptor
RDPApiTrace
RDPEncComTrace
MCUInfra
Collaboration
S4
Audio and Video Conferencing Logging
AudioVideoConferencingIssue
AvMcu
AvMP
MCUInfra
Collaboration
S4
Hybrid Cloud voice deployments
HybridVoice
MediationServer
S4
Sipstack
OutboundRouting
TranslationApplication
General Call logging
IncomingAndOutgoingCall
MediationServer
S4
Sipstack
TranslationApplication
OutboundRouting
InboundRouting
UserServices
Voice Mail
VoiceMail
Sipstack
ExumRouting
InboundRouting
IM and Presence Logging
IMAndPresence
Sipstack
UserServices
Address Book service logging
AddressBook
ABCommon
ABServer
ABServerIISModule
Dlx
Device Update service logging
DeviceUpdate
DeviceUpdate
DeviceUpdateHttpHandler
Lync Storage Service and Unified Contact Store logging
LYSSAndUCS
UserServices
Lyss
McuInfra
Centralised Logging Service logging
CLS
CLSAgent
CLSCommon
CLSController
CLSControllerLib
Support Portal logging
SP
SupportPortal
SPHelper
SPModule
SPSearchTool
SPCLSTool
CLSCommon
CLSControllerLib
Web Access Server logging
WAC
DataMCURunTime
DataMCU
LDM
Infrastructure
WebInfrastructure
InternalCommon
User Replicator Service (synchronization between AD DS and Lync Server)
UserReplicator
UserServices
Lync Online Migration
HostedMigration
HostedMigration
Powershell
WebInfrastructure
Monitoring and Archiving logging
MonitoringAndArchiving
UDCAgent
LILRLegacy
LILRLegacy
LogRetention
LegalIntercept
LILRLYSS
LILRLYSS
LogRetention
UDCAgent
Meeting logging
MeetingJoin
Collaboration
S4
UserServices
McuInfra
JoinLauncher
WebInfrastructure
Infrastructure
InternalCommon
UCWA
WebRelay
Response Group Service
RGS
RgsClientsLib
RgsCommonLibrary
RgsDatastores
RgsDeploymentApi
RgsDeploymentLibrary
RgsDiagnostics
RgsHostingFramework
RgsMatchMakingService
UserServices
Collaboration
S4
Sipstack
Call Park Service 
CPS
CpsDiagnostics
CpsHostingFramework
UserServices
Collaboration
S4
Sipstack
XMPP service logging
XMPP
XmppTGW
XmppCommonLibrary
XmppListener
XmppRouting
XmppTGWProxy
Collaboration
S4
Sipstack
Conference Auto Attendant 
CAA
CAAServer
Collaboration
S4
Sipstack
UserServices
Dial in conferencing MCU
ACPMCU
AcpMcu
Collaboration
S4
SipStack
Authentication Logging
Authentication
SipStack
UserServices
WebInfrastructure
UserPinService
CertProvisioning
High Availability
Disaster Recovery
HADR
UserServices
PowerShell
BackupService
RtcDbSyncAgent
Powershell
Powershell
Powershell
FilterApps
FilterApps
IIMFilter
ClientVersionFilter
ServerAgent
SipStack

Other Useful Commands

Show-CsClsLogging - Use to show the CLS status.
Stop-CsClsLogging - Use to stop a scenario
Start-CsClsLogging - Use to start a scenario
Get-CsClsScenario - Use to get information on the scenarios in your Lync deployment

The default folder for temp files is C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\Tracing seen by running Get-CsClsConfiguration.

I occasionally see the following error:
Failed on 1 agents
Agent - pool.domain.com, Reason - Error code - 20003, Message - Unknown error returned by Wpp native assembly - 1168. Please refer CLS logs for details.
Usually persistence will get around this - Try again until it works :)

To make life easier for your self James Cussen has written a PowerShell GUI for the Logging service which can be found here - http://www.mylynclab.com/2013/04/lync-2013-centralised-logging-tool.html

Cheers to James and Jens -
http://www.mylynclab.com/2013/04/lync-2013-centralised-logging-tool.html
http://blogs.technet.com/b/jenstr/archive/2012/08/01/using-centralized-logging-service-in-lync-server-2013-preview.aspx


Lync Server 2013 Synthetic Test PowerShell Script

Thanks to Murali Krishnan for this very useful script -

http://unifiedme.co.uk/2013/11/lync-server-2013-synthetic-test-script/


Core Tests
Test-CsAddressBookService
Test-CsAddressBookWebQuery
Test-CsASConference
Test-CsAVConference
Test-CsClientAuthentication
Test-CsDataConference
Test-CsGroupExpansion
Test-CsGroupIm
Test-CsIm
Test-CsLisConfiguration
Test-CsLocationPolicy
Test-CsP2PAV
Test-CsPresence
Test-CsRegistration
Test-CsReplica
Test-CsTopology
Test-CsUcwaConference
Test-CsWebApp
Test-CsWebScheduler

Edge Services
Test-CsAVEdgeConnectivity
Test-CsMcxConference
Test-CsMcxP2PIM
Test-CsXmppIM

Persistent Chat
Test-CsPersistentChatMessage

Enterprise Voice
Test-CsPhoneBootStrap
Test-CsPstnOutboundCall
Test-CsPstnPeerToPeerCall

Dial-in Conferencing
Test-CsDialInConferencing

Unified Messaging
Test-CsExUMConnectivity
Test-CsExUMVoiceMail
Test-CsUnifiedContactStore



Lync Polycom VVX Manager Tool

Cheers James!

http://www.mylynclab.com/2013/12/lync-polycom-vvx-manager-tool.html

Monday, 13 January 2014

Lync Cumulative Updates

Good up-to-date reference for Lync updates:

Lync 2010 - http://uclobby.wordpress.com/2013/09/05/lync-server-2010-cumulative-update-list/

Lync 2013 - http://uclobby.wordpress.com/2013/09/11/lync-server-2013-cumulative-update-list/

Cheers UC Lobby!!

Lync Discover URL's Summary

This is a summary of my understanding of the lyncdiscover records and the processes associated to them. Please let me know if you think I have misunderstood anything :)

There are 2 records which Lync will query in order:
1. lyncdiscoverinternal.<domain>
2. lyncdiscover.<domain>

NOTE: Some clients also continue on to query other records, however this article focuses only on lyncdiscover URL's.

lyncdiscoverinternal.<domain> should be a CNAME or A record to the Lync Front End server and only exist on the internal network.

lyncdiscover.<domain> should be an A record pointing to the IP address of the external web services which is normally an ISA reverse proxy. This record should also only exist externally.

It is quite common for the lyncdiscoverinternal.<domain> record to be intentionally and unintentionally omitted from internal DNS records. Many people do not see its worth due to the fact that all mobile client traffic is hair pinned via the external web services whether connected internally or externally. However with Lync 2013 the lyncdiscoverinternal.<domain> is far more important as all clients now attempt to resolve a lyncdiscover record before moving on to older methods such as SRV. By not having a lyncdiscoverinternal.<domain> record, ALL Lync 2013 clients that find a lyncdiscover.<domain> record will effectively be querying external web services - you probably dont want this to happen right?

For more information on the DNS records required for mobility see this post.

Lync Discover Process for Mobile Clients (including Windows Store App)

Internal - lyncdiscoverinternal.<domain> is resolved to the internal Autodiscover web service which returns a list of service URL's. Because both the internal and external Mobility Service URL's for Lync 2010, and the UCWA URL for Lync 2013 are all associated to the external Web Services FQDN, mobile traffic is routed externally via the reverse proxy regardless of location.

External - lyncdiscover.<domain> is resolved to the external Autodiscover web service (via the reverse proxy) which returns a list of service URL's. The mobile client will use this information to connect to the external Web Services FQDN.

Lync Discover Process for Desktop Clients

Internal - lyncdiscoverinternal.<domain> is resolved to the internal Autodiscover web service which returns a list of service URL's. The client uses this information to connect to the Front End server or pool.

External - lyncdiscover.<domain> is resolved to the external Autodiscover web service (via the reverse proxy) which returns a list of service URL's. The client uses this information to connect to the Edge servers SIP access interface.

You can use the Lync Connectivity Analyzer to learn more about the service URL's returned during Lync Discovery.


One of the most helpful articles in my quest to understand the Lync Discover process was by Jeff Schertz, Cheers! - http://blog.schertz.name/2013/07/understanding-lync-2013-mobility/

Lync and UM Licence Reporting Script

This script will report on the number of CAL/SAL licences that are in use for Lync and Exchange for a specified Active Directory OU.

Licence Summary Report



User Summary Report


Download Lync Licence Reporting v2.0.ps1


Sunday, 12 January 2014

What's New in Lync Server 2013?

Server Roles
  • Monitoring and Archiving server is now co-located on the Front End server which reports directly to the monitoring/archiving backend database.
  • A/V conferencing is now always installed on the Front End server.
  • The uncommonly used Director role is no longer recommended but still available as an option.
  • Persistent Chat is a new server sole that replaces Group Chat
  • XMPP federation is now fully integrated

DR/High Availability
  • Backup registrar is taken a step further allowing users maintain nearly all functionality in the event of a failed pool.  Previously with Lync 2010 only voice was resilient. User data is now replicated between paired pools. Response Groups are still not highly available but can easily be backed up and restored manually within a 15 minutes. 
  • In Lync 2010 when the backend database goes down Lync goes in to a limited functionality mode. With Lync 2013 the Front End servers keep a full copy of the SQL backend databases. Lync 2013 also supports SQL mirroring on the back-end databases.

Enterprise Voice
  • In Lync 2010 a Gateway could only be associated with 1 Mediation server without the use of DNS trickery. Now in Lync 2013 Gateway/Trunks can be associated to multiple Mediation servers.
  • Inter-trunk routing is now supported so Lync can now be responsible for all call routing e.g. Lync could route a call from the PSTN to a legacy phone system.
  • Trunk translation rules can now not only be applied to the “called party” but also the “calling Party”.  This makes Caller ID presentation is much more manageable in Lync 2013.
  • Delegates can now set up simultaneous ringing to their mobile devices for incoming calls to their managers. This provides delegates with more flexibility, enabling them to answer calls on behalf of their manager without being tied to a desk phone. 
  • With Voicemail Escape Lync can determine if the call was answered immediately without ringing (for example if the call goes straight to voicemail) and pull the call back so it continues to ring on the user’s other endpoints.

Integration with Lync Online
  • Hybrid deployments now support a mixture of Lync on-premises and Lync Online users. 
  • You can also have all users running on Lync Online and make calls through an on-premises gateway. Media bypass means the media stream won't be hair pinned through the Lync Online service when making phone calls from an office with an on-premises gateway. - Feature has been depreciated.
Persistent Chat
  • Persistent Chat replaces Group Chat, and is now fully integrated in to Lync as a new server role. The Lync 2013 client supports this natively.

Client
  • Vastly revamped Windows simplifies user experience
  • Windows Phone, iOS, and Android mobile clients can now join meetings as well as make audio/video calls via WiFi or mobile data.
  • Lync Web App has had a major overhaul making it much easier to use and now with full conference support
  • Lync Room System specifically designed for meeting rooms

Other
  • IPv6 supported
  • VDI plugin for virtual desktop environments
  • HD support up to 1080p. Clients now use best supported video quality e.g. If HD is supported by some participants but not others Lync will present the best option for each client device. Previously Lync 2010 would reduce video quality for all participants to match the least capable device.
  • Skype Federation
  • Unified Contact store allows Lync contacts to be stored in Exchange. This includes a feature to merge duplicate contacts.
  • Archiving integration with Exchanges Legal Hold feature
  • Response Groups now support the delegation of managers and administrators

More Information

Friday, 10 January 2014

Lync Script - Get All Assigned Numbers

This script queries Lync for all assigned numbers and displays in a formatted table with the option to export to CSV. During processing LineURI's are run against a regex pattern to extract the DDI/DID and the extension to a separate column.

Numbers Queried: LineURI, Private Line, Analouge Lines, Common Area Phones, RGS Workflows, Exchange UM Contacts, Trusted Applications and Conferencing Numbers.

http://gallery.technet.microsoft.com/Lync-Get-All-Assigned-8c1328a0