As we mentioned before, for Enterprise Voice, Lync requires a dial plan that contains normalization rules that elaborate the phone number typed in by the user and standardizes it to the E.164 format. Normalization rules use .NET regular expressions (http://msdn.microsoft.com/en-us/library/hs600312.aspx).
As a starting point, I have used the UK-London-Lync.ps1
script generated with Ken Lasko's Lync Dialing Rule Optimizer.
To generate normalization rules, it is necessary to have at least an existing dial plan. We can create a site-level dial plan with the following cmdlet:
New-CsDialPlan -identity Site:Site001
The normalization rules created with the following cmdlets will be associated with the previously mentioned dial plan:
New-CsVoiceNormalizationRule -Name "UK-London-Local" -Parent "Site:Site001" -Pattern '^([378]\d{7})$' -Translation '+4420$1' -Description "Local number normalization for London, United Kingdom" New-CsVoiceNormalizationRule ...