Lync Server 2010 – Limited Functionality Is Available Due To An Outage

I had a customer log a support case detailing an issue whereby all Lync 2010 clients were displaying a red banner stating “Limited functionality is available due to an outage”, however this customer had only a single front end server. This message is typically displayed when users registered against and SBA experience a WAN outage in their location which results in them being unable to contact the associated front end server. The message shown in the client is illustrated below.

Limited Functionality

This issue affected all users registered again the front end server and upon viewing the application, system and Lync Server event logs a picture of how the issue was produced could be gained. Firstly in the front end server Lync Server event log the following error had been produced at the time the customer reported the issue:

Pas with FQDN: lync.domain.co.uk has been detected to be down.

PAS stands for Presence Agent Server and is the component of the Lync Server handling presence logic and traffic, turning to the system event logs on the front end detailed why the problem had occurred and why contacts could not be seen within the Lync client. The first error displayed was the following:

Reset to device, \Device\RaidPort0, was issued.

This detailed that access to the virtual machines storage subsystem had been interrupted for a short period of time and as such the following event was then also displayed:

SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [c:\csdata\backendstore\rtc\dynlogpath\rtcdyn.ldf] in database [rtcdyn] (7).  The OS file handle is 0x0000000000000740.  The offset of the latest long I/O is: 0x000000060aca00

The above error essentially caused the underlying message that was displayed in the Lync client and in order resolve the problem the virtual machine was moved to another virtualisation host which immediately caused the error in the client to disappear as reliable access to the storage volume was now possible.

Lync Server 2010/2013 Response Group Holiday Sets

I recently performed a Lync Server 2010 deployment for an organisation with a branch office in Aberdeen, Scotland. As their bank holidays vary slightly in comparison to England and Wales, I created a Response Group Holiday Set for Scotland. The original script layout credit goes to UnifiedMe, which you can find here.

1. Connect to your Microsoft Lync Server 2010/2013 front end server.

2. Open the Microsoft Lync Server Management Shell and paste the following contents in its entirety. Prior to doing so, enter the FQDN of your front end pool in the “ApplicationServer” section before running the command.

 $a = New-CsRgsHoliday -StartDate “06/05/2013 12:00 AM” -EndDate “07/05/2013 12:00 AM” -Name “2013 Early May”
$b = New-CsRgsHoliday -StartDate “27/05/2013 12:00 AM” -EndDate “28/05/2013 12:00 AM” -Name “2013 Spring”
$c = New-CsRgsHoliday -StartDate “05/08/2013 12:00 AM” -EndDate “06/08/2013 12:00 AM” -Name “2013 Summer”
$d = New-CsRgsHoliday -StartDate “02/12/2013 12:00 AM” -EndDate “03/12/2013 12:00 AM” -Name “2013 St Andrew’s Day”
$e = New-CsRgsHoliday -StartDate “26/12/2013 12:00 AM” -EndDate “27/12/2013 12:00 AM” -Name “2013 Boxing Day”
$f = New-CsRgsHoliday -StartDate “25/12/2013 12:00 AM” -EndDate “26/12/2013 12:00 AM” -Name “2013 Christmas Day”
$g = New-CsRgsHoliday -StartDate “01/01/2014 12:00 AM” -EndDate “02/01/2014 12:00 AM” -Name “2014 New Years Day”
$h = New-CsRgsHoliday -StartDate “02/01/2014 12:00 AM” -EndDate “03/01/2014 12:00 AM” -Name “2014 2nd January”
$i = New-CsRgsHoliday -StartDate “18/04/2014 12:00 AM” -EndDate “19/04/2014 12:00 AM” -Name “2014 Good Friday”
$j = New-CsRgsHoliday -StartDate “05/05/2014 12:00 AM” -EndDate “06/05/2014 12:00 AM” -Name “2014 Early May”
$k = New-CsRgsHoliday -StartDate “26/05/2014 12:00 AM” -EndDate “27/05/2014 12:00 AM” -Name “2014 Spring”
$l = New-CsRgsHoliday -StartDate “04/08/2014 12:00 AM” -EndDate “05/08/2014 12:00 AM” -Name “2014 Summer”
$m = New-CsRgsHoliday -StartDate “01/12/2014 12:00 AM” -EndDate “02/12/2014 12:00 AM” -Name “2014 St Andrew’s Day”
$n = New-CsRgsHoliday -StartDate “26/12/2014 12:00 AM” -EndDate “27/12/2014 12:00 AM” -Name “2014 Boxing Day”
$o = New-CsRgsHoliday -StartDate “25/12/2014 12:00 AM” -EndDate “26/12/2014 12:00 AM” -Name “2014 Christmas Day”
$p = New-CsRgsHoliday -StartDate “01/01/2015 12:00 AM” -EndDate “02/01/2015 12:00 AM” -Name “2015 New Years Day”
$q = New-CsRgsHoliday -StartDate “02/01/2015 12:00 AM” -EndDate “03/01/2015 12:00 AM” -Name “2015 2nd January”
$r = New-CsRgsHoliday -StartDate “03/04/2015 12:00 AM” -EndDate “04/04/2015 12:00 AM” -Name “2015 Good Friday”
$s = New-CsRgsHoliday -StartDate “04/05/2015 12:00 AM” -EndDate “05/05/2015 12:00 AM” -Name “2015 Early May”
$t = New-CsRgsHoliday -StartDate “25/05/2015 12:00 AM” -EndDate “26/05/2015 12:00 AM” -Name “2015 Spring”
$u = New-CsRgsHoliday -StartDate “03/08/2015 12:00 AM” -EndDate “04/08/2015 12:00 AM” -Name “2015 Summer”
$v = New-CsRgsHoliday -StartDate “30/11/2015 12:00 AM” -EndDate “01/12/2015 12:00 AM” -Name “2015 St Andrew’s Day”
$w = New-CsRgsHoliday -StartDate “28/12/2015 12:00 AM” -EndDate “29/12/2015 12:00 AM” -Name “2015 Boxing Day”
$x = New-CsRgsHoliday -StartDate “25/12/2015 12:00 AM” -EndDate “26/12/2015 12:00 AM” -Name “2015 Christmas Day”
New-CsRgsHolidaySet -Parent ApplicationServer:servername.domain.local -Name “Scotland Bank Holidays” -HolidayList ($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m,$n,$o,$p,$q,$r,$s,$t,$u,$v,$w,$x)

3. In the Lync Control Panel click “Response Groups” and then click to create or edit a workflow. Once the web site loads select the hunt or interactive response group that you need to apply the holiday set to and click edit. In the workflow editior under the “Specify Your Holidays” section you should now see the Response Group Holiday Set name displayed. Click to check the holiday set and the configure your preferred call routing method for the days contained within the created set and click Save at the bottom of the workflow once you have finished.

That’s it, the holiday set will now be active.

Lync Server 2010 & Mitel Direct SIP Connectivity

I recently performed a direct SIP trunk integration between a Mitel SX3300 PBX and Microsoft Lync Server 2010. Mitel have published a technical reference for direct SIP connectivity with Lync Server 2010, however this predominantly focuses on the configuration of the SIP trunk from the Mitel side as you would probably expect and the technical reference does not go into detail about what configuration is required in Lync Server 2010 in order to establish connectivity. The following information focuses on the Lync Server 2010 configuration for direct SIP connectivity and does not discuss the Mitel SIP or ASR rules required when placing calls through the 3300 gateways, this information focuses obtain the configuration of PSTN gateways in Lync Server 2010 for Mitel integration only.

1. Obtain Mitel technical reference SIPCoE 11-4940-00161 from the Mitel portal if you have an authorised account or from your PBX vendor. Alternatively you can view the configuration PDF file from here. Although this information is written specifically for MCD 4.2, the SIP trunk integration will work with lower software revisions, you will however notice some of the SIP configuration options detailed in the PDF will not be available in lower revisions.

2. Once the Mitel side of the SIP trunk has bee configured, connect to your Lync Server 2010 front end and open the topology builder. Once the topology builder has opened ensure that you have the mediation server role installed within your topology as this will be required when configuring Lync users for enterprise voice. If this feature is not installed, proceed and install the mediation server role before continuing onto step two.

3. Once the mediation server role is installed, navigate back to the topology builder and expand the “Mediation Pools” container. You should now see the FQDN of the server that holds the mediation role. Right click this object and select “Edit Properties” to invoke the properties window. Within the properties window check the “Enable TCP port” option and then continue to set the TCP listening port to 5060 as for the Mitel SIP trunk side the target TCP port for connectivity is 5060, so we need to ensure our mediation server is listening for requests on this port. An import thing to note here is that if you have any trusted applications, such as RCC integration or Cisco CUPS that already utilise port 5060 you will need to change the mediation server listening port and the destination TCP port of the Mitel SIP trunk to ensure the integration works correctly. If you are in this scenario I recommend setting the mediation server listening port to 5068 and also setting the target TCP port on the Mitel SIP trunk to 5068. The following screenshot illustrates the mediation server role configuration that is required.

Once the port has been set, continue and publish the topology to the CMS. Once the publishing has completed, either restart your front end server or restart the mediation server service. This is required so that the new mediation server port is enabled and listening for connections on the front end server. To confirm this, open a new command prompt window and type “netstat /an” and press return and you should now see the server listening for connections on port 5060 or port 5068 depending on your scenario.

4. Once the mediation server is now listening on the correct port, the required PSTN gateway can be added to the topology. In the topology builder right click the “PSTN Gateways” container and select “New IP/PSTN Gateway”. In the gateway dialog box enter the IP address or FQDN of the Mitel PBX you are establishing the SIP trunk to and then proceed to set the listening port to 5060 and the transport protocol to TCP. For reference the Mitel side of the SIP trunk will only accept inbound connections on TCP port 5060. Once this has been completed, click OK and return to the topology builder and then publish the topology. The following screenshot details the PSTN gateway configuration.

5. In the topology builder window expand the “Mediation Pools” container, right click the FQDN of your mediation server and select “Edit Properties” to invoke the properties window. You should now see the IP address or FQDN of your Mitel PBX as a PSTN gateway that can be associated with the mediation server. Highlight the created PSTN gateway in the unassociated gateways field and then click “Add” and click OK. Following this, continue and publish the topology before continuing to the next step.

6. Open the Lync Control Panel and navigate to Voice Routing -> Trunk Configuration and then click New -> Pool Trunk, when prompted select the PSTN gateway you have just created. For the direct SIP connectivity to work with Mitel systems we need to disable RCTP and refer support as Mitel does not support this functionality, you will note this is detailed in the Mitel technical reference on the final page of the document. Mitel do recommend enabling media bypass, however in Lync Server 2010 to achieve media bypass enablement with refer support and RCTP functionality disabled we need to perform some specific steps. Proceed and uncheck the “Enable refer support” and “Enable Media Bypass” boxes in the pool trunk window and then click OK. When back in the main trunk configuration window click “Commit” and then select to commit all changes. The following screenshot illustrates the aforementioned configuration.

7. Once the gateway has been added in the trunk configuration open the Lync Server Management Shell and run the following PowerShell commands to disable RCTP functionality. In the below example my PSTN gateway is called mitel.domain.local, please replace this FQDN with your own Mitel system when running the following commands.

Set-CsTrunkConfiguration -Identity PstnGateway:mitel.domain.local -RCTPActiveCalls $false -RTCPCallsonHold $false

Set-CsTrunkConfiguration -Identity PstnGateway:mitel.domain.local -EnableSessionTimer $true

8. Once the PowerShell commands have been executed return to the Lync Control Panel and navigate to Voice Routing -> Trunk Configuration. Select to edit your pool trunk PSTN gateway and in the configuration window check “Enable Media Bypass” and then click OK.  When back in the main trunk configuration window click “Commit” and then select to commit all changes.

The configuration of the SIP trunk is now complete, once a dial plan, voice policy, PSTN usage and route have been configured you should now be able to call between Mitel and Lync users and also pass calls to the PSTN once the Mitel ASR rules have been configured.

Lync Server 2010 – Client Recording Location

I recently had a requirement to store Lync 2010 recordings on a UNC path for a customer. Natively in Lync 2010, setting the recording location directly through the client to either a UNC path or a mapped drive is not supported, and there is a good reason as to why this is the case. When a Lync 2010 recording is invoked the data is streamed to the recording location and when the recording is stopped it is then processed and viewable in both the the Lync Recording Manager and as a WMV file if selected. If for example there was an interuption to network connectivity on the local client, this would impact the recording itself. If you do try and select a mapped drive as a recording location in the Lync 2010 client, the following error will be displayed.

If you have a particular requirement to place Lync recordings onto a mapped drive, the following work around can be performed. This work around utilises a HKEY_CURRENT_USER registry modification that is executed every time a user logs onto a workstation, the registry key itself sets the “RecordingRootDirectory1” value to be the mapped drive or UNC path that you require. In order achieve this, the following actions need to be performed.

1. Download the LyncRecordingLocation registry file from here.

2. Open the registry file in notepad and amend the “RecordingRootDirectory1″=”S:\\LyncRecordings\\” entry to read a mapped drive or UNC location of your choice and then save the file.

3. Connect to a domain controller in your infrastructure and then open the Group Policy Management Console. From here, create a new GPO named “Lync Recording Location” for example, and then right click the newly created object and select edit.

4. When the GPO Editor opens navigate to the following location, User Configuration -> Policies -> Windows Settings ->Scripts, as illustrated below.

5. In the Scripts action pane, double click Logon to configure the script. When the Logon dialog box opens click Add which will invoke the “Add a script” dialog box. In the “Script Name” field type the following without quotes, “Regedit.exe”. In the parameters field enter the following without quotes “/s LyncRecordingLocation.reg”. See below for an illustration of this and once both of these fields have been populated click OK.

6. To complete the creation of the script, click the “Show Files” button and in the policies folder that then displays copy and then paste the LyncRecordingLocation.reg file into this area and close the window. Click Apply and the OK on the Logon Properties dialog box and then exit the Group Policy Management Editor.

7. Back in the Group Policy Management Console, locate an Organisational Unit (OU) where your Lync 2010 users reside, right click the OU and then select “Link an existing GPO” and then select the Lync Recording Location GPO that you have created. This could also be filtered to a specific Active Directory group that requires recordings to be stored centrally, choose which ever option is suitable for your environment.

8. Have your Lync 2010 users log off their workstations and back on again. Open the Lync 2010 client, select Options -> File Saving, and ensure that the Lync Recordings Save To dialog box is now showing the mapped drive or UNC path you set in the registry file, as illustrated below.

That’s it, the process is now complete.

Lync Server 2010 – ABSConfig Issue

I was recently using the ABSConfig.exe tool, which is a part of the Lync Server 2010 Resource Kit, to make some modifications to the address book for number normalisation. After playing around for a while I decided, to be safe, I would use the “Restore Defaults” button on the ABSConfig tool to put me back to where I started. Soon after clicking the button it appeared all was not well. I noticed that when querying users in the Lync 2010 client, that opposed to it showing a users given name, it was actually showing their job title. I also noticed that corporate photo graphs for new users, ones that were not in my clients ABS cache file, were not being displayed. It tuns out that the ABSConfig.exe tool in the Lync Resource Kit had been released by Microsoft still containing the OCS 2007 R2 database modification. Effectively, clicking Restore Defaults in the ABSConfig tool in a Lync front end server caused the RTC database to be overwritten with OCS attributes resulting in a pretty much destroyed address book.

I located a great blog post here, which provides an SQL query to restore the address book attributes in the RTC database back to Lync RTM. This worked great for name lookups but my corporate photographs would still not sync. After a weekend of investigating the issue, I decided to contact Microsoft Partner Support, who provided me with a SQL query that resolved all my address book and corporate photograph issues. The solution provided is detailed below:

1. On the standard edition server, or the server which holds the RTC database, install the Microsoft  SQL Server 2008 Management Studio and connect to the RTC database.

2. Click on “New Query” and paste the following SQL into the query window and click the execute button. The execute button is the small green “play” icon.

use rtc
exec dbo.RtcDeleteAbAttributes
exec dbo.RtcAddAbAttribute 1, N’givenName’, 0x01400000
exec dbo.RtcAddAbAttribute 2, N’sn’, 0x02400000
exec dbo.RtcAddAbAttribute 3, N’displayName’, 0x03420000
exec dbo.RtcAddAbAttribute 4, N’title’, 0x04000000
exec dbo.RtcAddAbAttribute 5, N’mailNickname’, 0x05400000
exec dbo.RtcAddAbAttribute 6, N’company’, 0x06000000
exec dbo.RtcAddAbAttribute 7, N’physicalDeliveryOfficeName’, 0x07000000
exec dbo.RtcAddAbAttribute 8, N’msRTCSIP-PrimaryUserAddress’, 0x08520C00
exec dbo.RtcAddAbAttribute 9, N’telephoneNumber’, 0x09622800
exec dbo.RtcAddAbAttribute 10, N’homePhone’, 0x0A302800
exec dbo.RtcAddAbAttribute 11, N’mobile’, 0x0B622800
exec dbo.RtcAddAbAttribute 12, N’otherTelephone’, 0x0C302000
exec dbo.RtcAddAbAttribute 13, N’ipPhone’, 0x0D302000
exec dbo.RtcAddAbAttribute 14, N’mail’, 0x0E500000
exec dbo.RtcAddAbAttribute 15, N’groupType’, 0x0F010800
exec dbo.RtcAddAbAttribute 16, N’Department’, 0x10000000
exec dbo.RtcAddAbAttribute 17, N’Description’, 0x11000100
exec dbo.RtcAddAbAttribute 18, N’manager’, 0x12040001
exec dbo.RtcAddAbAttribute 19, N’proxyAddresses’, 0x00500105
exec dbo.RtcAddAbAttribute 20, N’msExchHideFromAddressLists’, 0xFF000003

3. From the Lync Management Shell run the following command: Update-CsUserDatabase

4. Open up the servers event viewer and wait until you can see Lync events 30024, 30027 & 30028 before proceeding with the next step.

5. From the Lync Management Shell run the following command: Update-CsAddressBook and wait around ten minutes before proceeding with the next step.

6. Open a Lync 2010 client and wait for the address book to download, this should have now resolved all address book issues.

Thanks to Mike Halfacree at Microsoft UC Support for the resolution.

Lync Server 2010 – Audio Test Service Issue

I recently experienced an issue when attempting to check the audio quality from a Lync 2010 client. When clicking the “Check” button under the enterprise voice tab of the client, I was greeted with a “Call has not completed or has ended” error. After some investigation it turned out this had occurred due to the primary SIP domain being renamed after the Lync Server installation had been performed and as a result the Test Call auto attendant still had the old SIP domain appended to it. To resolve this issue the following actions were performed:

1. Log on to your Lync server and open the Lync Server Management Shell. When the Management Shell opens type in the following command without quotations, “Get-CSAudioTestServiceApplication” and press return. You should now be presented with a service output and the key part we are looking for is the following:

OwnerUrn: urn:application:testbot
SipAddress: sip:R[email protected]

In my case, my primary SIP domain was no longer contoso.local, this was not even a secondary SIP domain. This ment that when attempting to perform a test call, the SIP address associated with the test bot could not be reached.

2. Now that you have confirmed the SIP address being used for the test call is incorrect, we can now look at a second section of the Get-CSAudioTestServiceApplication output in order to identify exactly what Active Directory attribute we need to modify. Under the identity section of the output you should see a similar string to the following:

Identity: CN={46577062-9cae-404b-b89c-a3d39511e4cc},CN=Application Contacts,CN=RTC Service,CN=Services,CN=Configuration,DC=contoso,DC=local

The CN={46577062-9cae-404b-b89c-a3d39511e4cc} attribute is the one which holds the SIP information for the test call bot. Now we know what attribute we need to modify, you can perform the following actions:

3. Logon to domain controller. From the Run dialog box type adsiedit.msc and click ok to open the ADSI Editor.

4. Right click ADSI Edit and then choose Connect To, and then select Configuration from the “Select a well known Naming Context list” and click ok.

5. Click on node CN={46577062-9cae-404b-b89c-a3d39511e4cc}, CN=Application Contacts, CN=RTC Service, CN=Service, CN=Configuration, DC=yourdomain, DC=local, and then right click this node and then select properties.

Note: Replace the “CN=46577062-9cae-404b-b89c-a3d39511e4cc” attribute that was identified in the Get-CSAudioTestServiceApplication output with the GUID for your organisation. The GUID’s specified are unquie to my Active Directory domain.

6. Choose the msRTCSIP-PrimaryUserAddress attributes, and change the domain part of value to sip:RtcApplication-0e0e407a-6283-4c93-99fa-c0e252b8af09@yourdomain.co.uk, opposed to your domain.local. Essentially the domain part of the attribute must match what ever your primary SIP domain is.

7. Log on to your Lync 2010 front end server and restart Audio Test Service. Once the service has been restarted, attempt a test call from Lync 2010 client.

That’s it, you should now be able to make test audio calls from Lync clients.