다음을 통해 공유


Lync 2013 and Skype for Business: Normalization Rules

Normalization rules are created to translate phone numbers into different formats so that Lync/SFB can understand and transfer them to a correct location, user.

It is created to translate dial strings to E.164 format for the purpose of performing reverse number lookup.

This reverse lookup is applied and reverse number lookup is performed, the called number is translated to an appropriate format so that the Lync/SFB mediation or the PBX receives the number in their understandable format so that they can perform the routing.

It's better to Classify Normalization rules in the below scope:

User Dial plan –  Per User basis

Pool Dial plan –  Applicable to PSTN or registrar

Site dial plan –  Applies to Entire site

Global Dial plan – For all users

It's always better to create normalization rules rather than leaving the global as such. It will be easier to assign valid number patterns for each site according to the country and their area codes.

You need to keep these things in mind while creating a Normalization Rule:

Dial plan – Per user, Per site, Pool or Global.

Country code – Choose the correct country codes according to your area.

Area code – Choose the right area code.

Length of extension – Make sure choose the correct length of extension that your PBX supports. Here is a sample  format: ^(\d{4})$ [A regular expression should start with a ^ – This is a beginning of the string.]

Should end with $ – which should be at the end.

So any number within the brackets is counted as variable: $1

https://exchangequery.files.wordpress.com/2015/10/test111.png?w=600

Similarly, add the digit line URI format that your PBX supports for the SIP Trunk integration. So you need to input the right pattern and the correct digits which combines and creates a right translation rule.

These Translation rules modify the number before it leaves your Lync server so that your integrated PBX setup can understand the routing correctly.

Basically, the normalization rules input is provided by the address book service. So the rules are triggered once the number is received from the Address Book Service. The Address Book Service is designed in a way that it removes all the non-mandatory characters before the rule triggers. So you wouldn’t need to worry about these non-mandatory characters.

So you need to make sure the phone numbers are correctly populated in the Active Directory so that they can be fetched and used for the Lync.

If you already have provided the numbers in E.164 format then your job would be pretty much easy.

Now we will see how to populate these values in Lync 2013 and Skype for Business.

If its Lync Server 2013, you need to use a **Company_Phone_Number_Normalization_Rules.txt **file located in your Lync File Store location. Open the topology builder and see your file store location in the below folder:

Webservices\ABfiles\Company_Phone_Number_Normalization_Rules.txt

In the above example, we need to open the text file, add the below and save it:

(\d{4})

+971$1

Once the above is done you need to run the below command:

Get-CsAddressBookConfiguration

Make sure that use normalization rules are set to true:

https://exchangequery.files.wordpress.com/2015/10/444.png?w=600

Also, there will be a notepad named Invalid_AD_Phone_Numbers created inside ABS files folder.

Those numbers you get in the txt are not acceptable number formats and you need to change them for the AD.

You can also test the normalization rule by running ABServer.exe file in the below path:

C:\Program Files\Microsoft Lync Server 2013\Server\Core\ABServer.exe -testPhoneNorm “1234565”

From Skype for Business, this job has been made simpler. There are no such files we need to modify for this functionality.

The only thing you need to make sure is that you have entered the phone numbering format in the correct pattern E.164

If that is the case, you can run the below commands from which we need to modify the new set of default roles according to your region and country/area codes.

These can be defined in the Organizational  Level by the below commands:

New-CsAddressBookNormalizationConfiguration
 
Set-CsAddressBookNormalizationConfiguration

In turn, we need to create rules for translations and conversions:

New-CsAddressBookNormalizationRule
 
Set-CsAddressBookNormalizationRule