Share via


Communications Server "14" Voice Configuration Beta to Beta Refresh

Migrating Voice Configuration from Microsoft Lync Server 2010 Beta to Beta Refresh

Everyone knows that using Beta software comes with its benefits, but also its headaches. The main benefit is that you get an early look at a product as well as some input into improvements that might be made in that product before it gets released. The main drawback to using Beta software is that, after you’ve gone to all the trouble of installing and configuring the product, you’re going to need to start all over and do it again when the next release comes around.

It’s possible that, with the Beta release of Microsoft Lync Server 2010 (formerly know as Microsoft Communications Server “14”), you configured your deployment for Enterprise Voice. Now it’s time to move on to the Beta Refresh release. How do you save off all those voice policies, configurations, dial plans, and so on? That’s where Windows PowerShell comes in. Using Windows PowerShell, you can export your Beta configuration, then, after making a few changes to the exported files, import them into your Beta Refresh configuration.

Could we have scripted this whole thing, including updating the XML files? Probably. But searching and replacing text isn’t that difficult, so we left it at that for now.

Note: With your version of Lync Server Beta Refresh you should have received a documentation package. Refer to the document Microsoft Communications Server “14” – Minor Version Upgrade: Beta to Beta Refresh (MinorVersionUpgrade.docx) for a detailed explanation of how to do a full migration. The steps shown here are simply the Windows PowerShell commands you can use to save off some of your voice configuration information and import it into a new installation.

Backup in Beta

In your Beta installation, back up all your voice configuration files using these six commands:

Get-CsDialPlan | Export-Clixml -path c:\save\DialPlan.xml

Get-CsVoicePolicy | Export-Clixml -path c:\save\VoicePolicy.xml

Get-CsVoiceRoute | Export-Clixml -path c:\save\VoiceRoute.xml

Get-CsPhoneUsage | Export-Clixml -path c:\save\PhoneUsage.xml

Get-CsVoiceConfiguration | Export-Clixml -path c:\save\VoiceConfiguration.xml

Get-CsTrunkConfiguration | Export-Clixml -path c:\save\TrunkConfiguration.xml

These sample commands save all the XML files to the folder C:\Save. Needless to say, however, you don’t have to use a folder named C:\Save. Use any folder you want; just make sure you change the file path in each of the commands.

After you’ve exported all your voice configuration files you might want to stash those files on a memory stick or a shared folder or somewhere other than the server you’re about to upgrade. That way you’ll have a copy should the C:\Save folder get wiped out during the upgrade.

Restore Beta Configuration in Beta Refresh

After you’ve installed Beta Refresh, follow these instructions to import the configuration into the new install. Some of the properties have changed between Beta and Beta Refresh, which is why you need to modify the backup files before you can import them.

Phone Usage (PSTN Usage), Voice Policy, and Voice Configuration

The properties for these objects have not changed significantly, which means you should be able to import them directly into the Beta Refresh using the following commands:

Import-Clixml –Path c:\save\phoneusage.xml | Set-CsPstnUsage

Import-Clixml –Path c:\save\voicepolicy.xml | Set-CsVoicePolicy

Import-Clixml –Path c:\save\voiceconfiguration.xml | Set-CsVoiceConfiguration

Trunk Configuration

Before importing the trunk configuration, you must modify the exported XML file (in our example, trunkconfiguration.xml):

Following every instance of <B N="EnableReferSupport">true</B> and every instance of <B N="EnableReferSupport">false</B> insert the following line:

<B N="EnableSessionTimer">false</B>

Following every instance of <Nil N="DeserializedIdentity" /> insert the following line:

<S N="UpaSeparator"></S>

After this section:

      <Obj N="OutboundTranslationRulesList" RefId="1">

        <TN RefId="1">

          <T>Microsoft.Rtc.Internal.XsdClassGenerator.ListWithEvents`1[[Microsoft.Rtc.Management.WritableConfig.Settings.TrunkConfiguration.TranslationRule, Microsoft.Rtc.Management.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]</T>

          <T>System.Object</T>

        </TN>

        <IE />

      </Obj>

   

Insert the following:

      <Obj N="SipResponseCodeTranslationRulesList" RefId="2">

        <TN RefId="2">

          <T>Microsoft.Rtc.Internal.XsdClassGenerator.ListWithEvents`1[[Microsoft.Rtc.Management.WritableConfig.Settings.TrunkConfiguration.SipResponseCodeTranslationRule, Microsoft.Rtc.Management.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]</T>

          <T>System.Object</T>

        </TN>

        <IE />

      </Obj>

Save trunkconfiguration.xml, then use this command to import the XML file:

Import-Clixml –Path c:\save\trunkconfiguration.xml | Set-CsTrunkConfiguration

Dial Plans

Before importing the dial plans, you must modify the exported XML file (in our example, dialplan.xml):

Dial plans contain normalization rules, which were exported with the dial plans. Each normalization rule within the exported dial plan contains a section that looks something like this:

<ToString>Description=Migrated;Pattern=^8005551915$;Translation=+18885551915;Name=8005551915 Ready Access;IsInternalExtension=False;DoNotUseFromDevice=False</ToString>

From all instances of that section, remove the following:

;DoNotUseFromDevice=False

Or, in the cases where the value was modified, remove this:

;DoNotUseFromDevice=True

After that’s done, remove all instances of the following line:

<B N="DoNotUseFromDevice">false</B>

And this line, too:

<B N="DoNotUseFromDevice">true</B>

Next, go through the document and look for a block of text similar to this:

      <Nil N="ExternalAccessPrefix" />

      <S N="Name">DefaultProfile</S>

Change Name to SimpleName:

      <Nil N="ExternalAccessPrefix" />

      <S N="SimpleName">DefaultProfile</S>

Note. Don’t just do a blanket search-and-replace and replace each instance of Name with SimpleName. Doing that will result in changing some values that really shouldn’t be changed. Make sure you search for those instances that follow the line for ExternalAccessPrefix.

Save dialplan.xml, then use this command to import the XML file:

Import-Clixml –Path c:\save\dialplan.xml | Set-CsDialPlan

Voice Routes

Sorry, this one’s a little more difficult. If you’ve added values to the PSTN Gateway list, the service IDs have changed and doing a simple import from the Beta build is a challenge we haven’t figure out yet. If you figure it out before we get to it, let us know and we’ll post it here. Otherwise you’ll have to re-input your voice routes. Or, follow the upgrade instructions in Microsoft Communications Server “14” – Minor Version Upgrade: Beta to Beta Refresh.