Severity: Warning
Message: filemtime(): stat failed for D:\xampp_old\htdocs\ebookreading.net\application\writable1/ci_session199516f72ff920b5b0c894cf5fbcec599iaqioopto3pi6aa0vmgcu3ntb8mgi2o
Filename: controllers/Base.php
Line Number: 44
Backtrace:
File: D:\xampp_old\htdocs\ebookreading.net\application\controllers\Base.php
Line: 44
Function: filemtime
File: D:\xampp_old\htdocs\ebookreading.net\application\controllers\View.php
Line: 10
Function: __construct
File: D:\xampp_old\htdocs\ebookreading.net\index.php
Line: 380
Function: require_once
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.
New-CsDialPlan -identity Site:Site001
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 -Name 'UK-TollFree' -Parent "Site:Site001" -Pattern '^0((80(0d{6,7}|8d{7}|01111)|500d{6}))$' -Translation '+44$1' -Description "TollFree number normalization for United Kingdom" New-CsVoiceNormalizationRule -Name 'U K-Premium' -Parent "Site:Site001" -Pattern '^0((9[018]d|87[123]|70d)d{7})$' -Translation '+44$1' -Description "Premium number normalization for United Kingdom" New-CsVoiceNormalizationRule -Name 'UK-Mobile' -Parent "Site:Site001" -Pattern '^0(7([1-57-9]d{8}|624d{6}))$' -Translation '+44$1' -Description "Mobile number normalization for United Kingdom" New-CsVoiceNormalizationRule -Name 'UK-National' -Parent "Site:Site001" -Pattern '^0((1[1-9]d{7,8}|2[03489]d{8}|3[0347]d{8}|5[56]d{8}|8((4[2-5]|70)d{7}|45464d)))(D+d+)?$' -Translation '+44$1' -Description "National number normalization for United Kingdom" New-CsVoiceNormalizationRule -Name 'UK-Service' -Parent "Site:Site001" -Pattern '^(1(47d|70d|800d|1[68]d{3}|dd)|999|[*#][*#d]*#)$' -Translation '+$1' -Description "Service number normalization for United Kingdom" New-CsVoiceNormalizationRule -Name 'UK-International' -Parent "Site:Site001" -Pattern '^(?:00)((1[2-9]dd[2-9]d{6})|([2-9]d{6,14}))(D+d+)?$' -Translation '+$1' -Description "International number normalization for United Kingdom"
'^([378]d{7})$'
) is a pattern that matches any phone number that starts with 3,7, or 8 (and the following 7 digits). Then, for the translation, the $
symbol captures the digits from the pattern (which were included inside the parentheses) and normalizes them into the E.164 format prefix with +4420 ('+4420$1'
). The rule normalizes local calls in London; for example, a call to 70405060 will be translated to +44 20 70405060.'^0((80(0d{6,7}|8d{7}|01111)|500d{6}))$'
) standardizes to E.164 tool-free numbers in the UK (starting with 0800, 0808, and 0500), removing the initial 0
and adding the CC of United Kingdom, +44 ('+44$1'
).In the following image, we can see a schema of the phone numbers that we are going to manage with this rule:
'^0((9[018]d|87[123]|70d)d{7})$'
) standardizes numbers that are mainly used for horoscopes, chat lines, TV voting and other services (090, 091, and 098), customer service lines (0871, 0872, and 0873), and numbers used to divert calls to another phone number (070). Again, the initial 0
is removed and the CC of United Kingdom, +44, is added ('+44$1'
).'^(?:00)((1[2-9]dd[2-9]d{6})|([2-9]d{6,14}))(D+d+)?$'
) normalizes international calls (the first half of the rule takes care of North American numbers, and the second half takes care of the rest of the world). The rule acts by removing the initial 00
and capturing all the calls to numbers with a pattern like the one in the following schema (the + sign is added, '+$1')
:To read (and edit) the regular expressions used in Lync normalization rules, I suggest that you use a free tool, Expresso 3.0 (http://www.ultrapico.com/ExpressoDownload.htm). As we can see in the following screenshot, using this tool makes it easier to understand complex regex strings, like the ones we need to manipulate phone numbers:
Please note that Expresso requires a (free) registration to keep using it after 60 days.