…… or normalization, as some may say ! ! !
To keep to best practice in a Lync Server 2010 project it is always recommended that users numbers in AD are in RFC 2916 (E164) format. Obviously for a customer with many users this becomes a bit of a chore and one that is always nicely filed under “Customer Pre-reqs” in any project plan ! !
So I had a play with the fabled company_phone_number_normalization_rules.txt file ……… this should be stored in the ABFiles folder of the Lync share that is published as part of your topology. In my case ……. D:\LyncShare\1-WebServices-1\ABFiles
There is a sample file included elsewhere in the Lync Program Files folder. A lot of the samples given are complex and mean nothing. My scenario is reasonably simple; in the UK most numbers stored in AD are 11 digits long, ie National (01246 123 456), Mobile (07790 123 456) or Private (0870 123 4567). The one thing you do learn from the sample file is that a correct normalisation rule will get rid of trailing spaces, gaps, brackets etc (ie it only reads the numbers !)
So in my scenario, I wanted to automate the normalisation. Looking in the event viewer prior to playing, there were regular 21034 LSAddressBook warnings as below indicating:
I created the text file in the above location and added one simple line as follows:
## ## Normalize 11-digit phone number patterns from Active Directory into +E.164 ## (\d{11}) +44$1 |
This seemed to be mentioned on a couple of respected web sites and blogs but it didn’t work for me. I ran a update-CSaddressbook –force –verbose but alas only succeeded in receiving a warning 21034 as above. So I found the following on a blog specifically discussing UK usage:
## match National to UK E.164 \+?0([1-9]\d{7,9}) +44$1 |
This seemed to do the trick and my 21034 warning is now a lot better and the 4 “failures” relate to disabled accounts.
I could have been a lot cleverer and made more rules but this is simple enough in my current environment. Thanks to http://visualplanet.org/blog/?p=91
Obviously the parsing of this file at address book update time DOES NOT change any attributes of users numbers in AD, it merely helps Lync to see them in a way it understands (E164) so it can present them properly in the Lync client and contact cards etc …….
Hope this helps, I’ve always fancied having a bash.