Lync 2013 MCU and Old Conference Directories

After installing a Lync Server 2013 pool and moving users over, you might find they are unable to create new conferences if they are enabled for PSTN dial-in conferencing. When running a SIPStack trace you’ll find the following error during creation of the conference:

Start-Line: SIP/2.0 500 failedLookupForConferenceDirectoryOwner
ms-diagnostics: 3193;reason="Could not find a front end server that owns the given pstn meetind id."

Which might lead you to notice that Front-End is logging error Event 51048, LS MCU Factory:

McuFactory could not find the pool associated with one of the conference directories.
Failed to read pool FQDN associated with conference directory 20.

Cause: The pool associated with the conference directory does not exist anymore.
Resolution: Conference directories without a valid pool associated can be deleted using management tools.

The issue seems to be that if orphan conference directories exist, they may prevent new conferences for 2013 users. You can check for orphan directories via:

Get-CsConferenceDirectory | FT Identity,ServiceID

Review the output and check to see if there is a ServiceID matching a pool which no longer exists. BackCompatSite entries refer to OCS 2007 R2 servers added during a merge operation.

If a Service ID exists for a pool that has been deleted the conference directory cannot be moved at this point, but you can use the following command to forcefully remove it:

Remove-CsConferenceDirectory <Identity Number> –Force

Take care to make sure you’re deleting the correct identity. Removing an active conference directory will force users to reschedule meetings.

Migrating OCS conference directories to Lync the hard way

A few evenings ago I ran into a scenario where moving a conference directory from OCS to Lync failed, and the conference directory ended up in this limbo state where it wasn't on Lync, I couldn't move it back to OCS, and the conferencing attendant wouldn't recognize any PSTNs IDs which were part of the directory. Not a great scenario.

After running Move-CsConferenceDirectory I could verify the move was in progress, but it never completed. The status would show it was trying to move, and OCS eventually started throwing errors that it no longer had a conference directory, but it never fully made it to Lync. The TargetServerIfMoving parameter stayed populated:

Get-CsConferenceDirectory -Identity 5
Identity: 5
ServiceId: UserServer:OCSPOOL.ptown.local
TargetServerIfMoving: UserServer:LYNCPOOL.ptown.local

Trying to run Move-CsConferenceDirectory again would consistently fail with the following errors:

WARNING: Move operation failed for conference directory with ID "5". Cannot perform a rollback because data migration might have already started. Retry the operation.
WARNING: Before using the -Force parameter, ensure that you have exported the conference directory data using DBImpExp.exe and imported the data on the target pool. Refer to the DBImpExp-Readme.htm file for more information.
Exception from HRESULT: 0xC3EE7950, Microsoft.Rtc.Management.ConferenceDirectoryCmdlets.MoveConferenceDirectoryCmdlet

In the end I needed to export the data from the OCS directory via DbImpExp, force the directory to move, and then import the data. Not the cleanest route, but it works. The order is important, so be patient.

On the OCS pool and database export the conference directory data:

DbImpExp.exe /hrxmlfile:C:\Temp\OCSDirectory5.xml /SQLServer:OCS-SQL.ptown.local /restype:confdir

Only once you're positive you have a good export (Read: opened the file and checked!), and made a copy of it you can force the Move-CsConferenceDirectory operation:

Move-CsConferenceDirectory 5 -TargetPool LYNCPOOL.ptown.local -Force

Congrats. You've moved the directory to Lync, but it's empty. Copy the .xml export file to a FE in the Lync pool. On the Lync pool and database import the directory data while specifying the conference directory ID to recover the old data:

DbImpExp.exe /import /hrxmlfile:C:\Temp\OCSDirectory5.xml /SQLServer:LYNC-SQL.ptown.local /restype:confdir /dirid:5

At this point I could see the directory was no longer moving because TargetServerIfMoving was empty, and the conference attendant was now recognizing PSTN IDs which had been created against this directory.

Get-CsConferenceDirectory -Identity 5
Identity: 5
ServiceId: UserServer:LYNCPOOL.ptown.local
TargetServerIfMoving: 

Again, this is a good reason to always do a DbImpExp.exe dump before moving directories or databases around. Those .XML files can save your skin!

Data MCU Unavailable in Lync

While attempting a Lync conference with one of my customers we noticed the options for whiteboarding and PowerPoint were unavailable in the user interface. These items are served up by the Data MCU, and are not displayed if that MCU cannot be contacted for some reason. We took a look at the Lync server logs and found events like this one continuously appearing:

A Create Conference request sent to an Mcu was rejected. It will be retried but if this error continues to occur conferencing functionality will be affected.

Mcu: https://<Server FQDN>:444/liveserver/datamcu/ Conference: sip:<SIP URI>;gruu;opaque=app:conf:focus:id:FPGCC8M9 Error: otherFailure
Cause: Overloaded or incorrectly functioning MCU.
Resolution: Ensure that the Mcu is functioning correctly.

Everything else in the environment seemed ok, but I also noticed some errors around address book photo permissions going on so I took a peek at the back-end file share for web components. It appeared the file share NTFS permissions had somehow been reset to where the RTC groups did not have the necessary read and write access, so these errors were showing up. The fix was really easy: open Topology Builder, download the existing topology, and re-publish. Publishing the topology will verify the file share permissions and reset them if needed.