Configuring normalization rules for the Lync 2010 address book

Lync by default automatically pulls telephone information from active directory and publishes it to clients each morning at 1.30AM however often the telephone numbers entered in active directory have various problems, inconsistencies or are otherwise not formatted correctly for Lync to use.  If this is the case you may notice contact cards in the Lync client contain no phone numbers (or have some numbers missing) while if you examine the user in outlook or directly in active directory you can clearly see telephone numbers are configured for them.  Lync will only function with E.164 style numbers and as a result unless all of your numbers are stored correctly in this format, many will be missing.

A full list of numbers which fail to normalize can be found in the Lync Server event log of your front end server.  (normally logged shortly after 1:30AM) with event ID 21034.

 

As you can see there is a handy link to a file which contains a full list of the failed numbers.  The ideal way to fix this would be to edit all the numbers so they are stored in the right format.  For example changing a DDI and extension from 01372 112233 and 2233 to be stored as +441122112233;ext=2233 often this isn’t possible or desirable if other applications use these numbers and instead it maybe preferable (and quicker) to follow what the text in the event log suggests and setup normalization rules in the optional “Company_Phone_Number_Normalization_Rules.txt” file.

This was the case for me recently and I ended up creating the following rule to normalize standard UK national numbers into international E.164 style numbers:

## match National to UK E.164
\+?0([1-9]\d{7,9})
+44$1

(where +44 is your country code)

In an ideal world all your extension numbers will match your DDI numbers as well so you can normalize them with a rule similar to this:

## 9xxx extn into ddi
\+?(9\d\d\d)
+44112233$1;ext=$1

(where +44112233 is the appropriate area and regional code)

For my environment these two rules cut the number of failed numbers to 87.  If you cant wait until 1:30AM the next morning to see the results of your changes run ” Update-CSAddressBook” in the Lync shell window and wait approximately 5 minutes for the process to complete and the messages to appear in the event log.

In addition to the above if you wish to clear the cashed address book in a Lync client first close the client and navigate to %profilepath%\AppData\Local\Microsoft\Communicator and delete the appropriate SIP folder and then restart the client.  This will force it to re-download the address book and you can instantly enjoy the results of your changes.

A great reference on how to create these rules can be found here.

One Reply to “Configuring normalization rules for the Lync 2010 address book”

  1. Hi,

    Lync can use the symbol “number” # in the dial plan? Example must call extension ##4698, I set the path to the dial plan to rule ^(\##(\d{4}))$ also ^(##(\d{4}))$ and change the # to %23 generating an error in the call. The Lync test to verify the normalization runs successfully, but when marking the gateway generates error that marks %23%234698 instead of dialing ##4698.

    Regards,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.