Internationally recognized telephone number format Defines the format





Internationally recognized telephone number format Defines the format for telephone numbers in SIP Country Area Code Tel URI Local number Global number in E. 164 format Extension (optional)

Get to know regex basics: ^ $ d d{3} d{1, 5} d+ d* D start of pattern end of pattern single digit 3 digits 1 to 5 digits 1 or more digits 0 or more digits non-digit [135] [1 -5] 135 ? + | (123) $1 1, 3 or 5 1 to 5 135 not required plus sign or Store 123 Return 123 http: //hanytaha. wordpress. com/ 2012/01/15/regular-expressionregex-and-lync-2010/ Test your regex: http: //www. regextester. com/


Good Bad 1 (604) 555 -1111 +1 (604) 555 -1111 x 234 +44. 20. 7123. 4567 +44. 020. 7123. 4567

Not necessary to change every phone number in AD Use the Company_Phone_Number_Nor malization_Rules. txt Found in \Lync. File. Sharex. Web. Services-xABFiles Lync Address book process parses AD-based numbers using this file Check by using ABServer. exe -Test. Phone. Norm “<samplenum>” Examples: ([2 -9]d{9})D+(d+) +1$1; ext=$2 ([2 -9]d{9}) +1$1

+44. 020. 7123. 4567

Takes user-dialed numbers and formats (“normalizes”) them for Lync What kind of calls users are able to make Available call features Call routing The specific path a call will take to the PSTN The link between voice policies and voice routes Final phone number manipulation before exiting Lync


UK-London-Local IT-Rome-International FR-Paris-Mobile US-New. York-National US-WA-Seattle-Toll. Free ES-Head. Office-All. Calls




PRO Every call can be sent to an all encompassing route (think *. *) Easier to manage and troubleshoot, especially in large deployments CON No least cost routing Can’t limit calling or call forwarding for users Can’t leverage several Lync features

PRO Very granular routing/call control possibilities Least-cost routing CON Many routes/PSTN usages Can be difficult to troubleshoot It’s…. ummm…it’s complicated




Normalize to E. 164, using the main office number for the location as the base: +12125551234; ext=2345 Strip back down to 2345 as the call leaves Lync Most normalization rules are the same countrywide, so consider that in your naming convention UK-London-Local UK-National UK-International Doing so will mean not normalizing to E. 164 Use the External Access Prefix option instead


6 045 +16042226045

96045551234 +16045551234
![Rule Name Pattern Transla tion NA-National ^1? ([2 -9]dd[2 -9]d{6})(D+d+)? $ +1$1 NA-Service ^([2 Rule Name Pattern Transla tion NA-National ^1? ([2 -9]dd[2 -9]d{6})(D+d+)? $ +1$1 NA-Service ^([2](http://slidetodoc.com/presentation_image_h/8c512f66b3f940f2e66c7901cfaaf78f/image-26.jpg)
Rule Name Pattern Transla tion NA-National ^1? ([2 -9]dd[2 -9]d{6})(D+d+)? $ +1$1 NA-Service ^([2 -9]11)$ +$1 NA-International ^(? : 011)? ([2 -9]d{6, 14})(D+d+)? $ +$1
![Rule Name Pattern Translatio n UK-London-Local ^([378]d{7})$ +4420$1 UK-Toll. Free ^0((80(0d{6, 7}|8d{7}|01111)|500d{6}))$ +44$1 UK-Premium Rule Name Pattern Translatio n UK-London-Local ^([378]d{7})$ +4420$1 UK-Toll. Free ^0((80(0d{6, 7}|8d{7}|01111)|500d{6}))$ +44$1 UK-Premium](http://slidetodoc.com/presentation_image_h/8c512f66b3f940f2e66c7901cfaaf78f/image-27.jpg)
Rule Name Pattern Translatio n UK-London-Local ^([378]d{7})$ +4420$1 UK-Toll. Free ^0((80(0d{6, 7}|8d{7}|01111)|500d{6}))$ +44$1 UK-Premium ^0((9[018]d|87[123]|70d)d{7})$ +44$1 UK-Mobile ^0(7([1 -57 -9]d{8}|624d{6}))$ +44$1 UK-National ^0((1[1 -9]d{7, 8}|2[03489]d{8}|3[0347]d{8}|5[56]d{8}|8((4[25]|70)d{7}|45464d)))(D+d+)? $ +44$1 UK-Service ^(1(47d|70d|800d|1[68]d{3}|dd)|999|112|[*#][*#d]*#) $ +$1 UK-International ^(? : 00)? ((1[2 -9]dd[2 -9]d{6})|([2 -9]d{6, 14}))(D+d+)? $ +$1



Use site-level policies by default Automatically assigned to all users homed on Lync servers within a site Assign the most typical call classes to capture the most users (ie. Local and National PSTN Usages) Example: Assign a sitelevel National voice policy for users who don’t require international dialing Use user-level policies for exceptions Manually assigned via Lync Control Panel or Powershell Assign additional or remove call classes for smaller groups of users (ie. International PSTN Usage) Example: Assign a user -level International policy to executives and others that require international dialing



X




Ordering and selection of PSTN Usages is critical




![Rule Name Pattern Translation NA-ON-Toronto-Local ^+1((905(20[^7]|21[02469]|22[1234]|23[^35]|24[178]|25[^1239]|26[45678]|28[^09]|29[^567]|30[^489]|31[36]|33[04789]|36[^0578]|39[1589]|40[^147]|41[23578]|4 2[^59]|46[^8]|47[^368]|48[^15]|49[^368]|51[034]|53[02349]|55[^1567]|56[^0123]|58[^19]|59[^246]|62[^0378]|64[029]|65[234]|66[039]|67[^459]|68[36]|69[^027]| 6[01]d|70[23679]|71[237]|72[4679]|73[1789]|74[04789]|75[^3]|76[^589]|77[013]|78[^68]|79[^7]|80[13458]|81[^018]|83[^0456]|85[^3]|86[^589]|87[^01]|88[^5]|89[ 01367]|8[24]d|90[^256]|91[^124]|93[69]|94[^125]|95[16]|96[589]|99[^1234]|326|350|370|542|636|927|970|(27|45|50)d))) $1 NA-National ^+1([2 -9]dd[2 -9]d{6})(; Rule Name Pattern Translation NA-ON-Toronto-Local ^+1((905(20[^7]|21[02469]|22[1234]|23[^35]|24[178]|25[^1239]|26[45678]|28[^09]|29[^567]|30[^489]|31[36]|33[04789]|36[^0578]|39[1589]|40[^147]|41[23578]|4 2[^59]|46[^8]|47[^368]|48[^15]|49[^368]|51[034]|53[02349]|55[^1567]|56[^0123]|58[^19]|59[^246]|62[^0378]|64[029]|65[234]|66[039]|67[^459]|68[36]|69[^027]| 6[01]d|70[23679]|71[237]|72[4679]|73[1789]|74[04789]|75[^3]|76[^589]|77[013]|78[^68]|79[^7]|80[13458]|81[^018]|83[^0456]|85[^3]|86[^589]|87[^01]|88[^5]|89[ 01367]|8[24]d|90[^256]|91[^124]|93[69]|94[^125]|95[16]|96[589]|99[^1234]|326|350|370|542|636|927|970|(27|45|50)d))) $1 NA-National ^+1([2 -9]dd[2 -9]d{6})(;](http://slidetodoc.com/presentation_image_h/8c512f66b3f940f2e66c7901cfaaf78f/image-42.jpg)
Rule Name Pattern Translation NA-ON-Toronto-Local ^+1((905(20[^7]|21[02469]|22[1234]|23[^35]|24[178]|25[^1239]|26[45678]|28[^09]|29[^567]|30[^489]|31[36]|33[04789]|36[^0578]|39[1589]|40[^147]|41[23578]|4 2[^59]|46[^8]|47[^368]|48[^15]|49[^368]|51[034]|53[02349]|55[^1567]|56[^0123]|58[^19]|59[^246]|62[^0378]|64[029]|65[234]|66[039]|67[^459]|68[36]|69[^027]| 6[01]d|70[23679]|71[237]|72[4679]|73[1789]|74[04789]|75[^3]|76[^589]|77[013]|78[^68]|79[^7]|80[13458]|81[^018]|83[^0456]|85[^3]|86[^589]|87[^01]|88[^5]|89[ 01367]|8[24]d|90[^256]|91[^124]|93[69]|94[^125]|95[16]|96[589]|99[^1234]|326|350|370|542|636|927|970|(27|45|50)d))) $1 NA-National ^+1([2 -9]dd[2 -9]d{6})(; ext=d+)? $ 1$1 NA-Service ^+([2 -9]11)$ $1 NA-International ^+([2 -9]d{6, 14})(; ext=d+)? $ 011$1 Rule Name Pattern Translation UK-London-Local ^+4420([378]d{7})(; ext=d+)? $ $1 UK-London-Service ^+(1(47d|70d|800d|1[68]d{3}|dd)|999|[*#][*#d]*#)$ $1 UK-London-All. Calls ^+44(d+)(; ext=d+)? $ 0$1 UK-London-International ^+((1[2 -9]dd[2 -9]d{6})|([2 -9]d{6, 14}))(; ext=d+)? $ 00$1



Normalize dialed extensions to E. 164 2345 +14165551111; ext=2345 Assign a route to the appropriate PBX ^+14165551111 PBX_Gateway Add a trunk translation rule to strip back down to extension +14165551111; ext=2345 ^(2d{3})$ 14165551111; ext=$1 ^+14165551111; ext=(2d{3})$ $1 or ^+d+D+(d+)$ $1

Easier to deal with routing and trunk translation when everything follows same standard Extremely important when migrating away from PBX to Lync Scenario: • Normalization/routing rules created specifically for PBX extensions • 2 xxx normalized to 2 xxx (not E. 164) • Lync migrated users configured with E. 164 Tel URIs • tel: +12125551111; ext=2 xxx • Original extension scheme maintained • How to dial Lync user by extension? • Normalization becomes a nightmare • Need to create user-specific normalization rules for every migrated user

Use a normalization rule to map the main number to an extension (E. 164 format, of course) When creating autoattendant or response group extensions, make sure to follow E. 164 standards






Applies to all location-based routing enabled users at the site Don’t enable locationbased routing on limited-access voice policies Check out Doug Lawty’s deep-dive session on Locationbased Routing (VOICE 303)

![Original Normalization Rule New Normalization Rule ^1? ([2 -9]dd[2 -9]d{6})(D+d+)? $ +1$2 ^(*67)? 1? Original Normalization Rule New Normalization Rule ^1? ([2 -9]dd[2 -9]d{6})(D+d+)? $ +1$2 ^(*67)? 1?](http://slidetodoc.com/presentation_image_h/8c512f66b3f940f2e66c7901cfaaf78f/image-55.jpg)
Original Normalization Rule New Normalization Rule ^1? ([2 -9]dd[2 -9]d{6})(D+d+)? $ +1$2 ^(*67)? 1? ([2 -9]dd[2 -9]d{6})(D+d+)? $ $1+1$2
![Pattern Translation ^(*67)? +1([2 -9]dd[2 -9]d{6})(; ext=d+)? $ 1$2 Pattern Translation ^(*67)? +1([2 -9]dd[2 -9]d{6})(; ext=d+)? $ 1$2](http://slidetodoc.com/presentation_image_h/8c512f66b3f940f2e66c7901cfaaf78f/image-56.jpg)
Pattern Translation ^(*67)? +1([2 -9]dd[2 -9]d{6})(; ext=d+)? $ 1$2


Dialing rules for 35 countries Custom localized dialing rules for all of North America Locationbased routing Simple or complex dial rules Leastcost/failove r routing Premium number blocking Use your own naming convention Extensions Call Park










- Slides: 68