The base condition for a Lync Enterprise Voice deployment to work correctly is to have all telephone numbers formatted in the E.164 standard. The previously mentioned standard requires a plus sign, followed by a maximum of three digits dedicated to Country Code (CC), and the remaining numbers dedicated to national standards, in order to identify subscribers. Depending on the length of the CC, the part that contains the city (area) code, local number, and extensions might vary (the maximum total length, anyway, is 15 digits, excluding extensions). Each country is able to decide how many digits it should use (considering that a 15-digit number allows for 100 trillion different permutations). The ITU E.164 documentation about the number structure for geographic areas (at http://www.itu.int/rec/T-REC-E.164-201011-I/en) divides the number in CC (1-3 digits), National Destination Code (NDC), and Subscriber Number (SN). NDC and SN are collectively called the national (significant) number. The schema is shown in the following image:
Normalization (converting numbers dialed in various formats to the E.164 format) is important for many reasons, including the fact that users in different locations are able to dial our phone numbers correctly only if they stick to the E.164 format. Dial plans in Lync contain rules that are used to normalize phone numbers, starting from the way our users are comfortable in dialing them. Normalization is performed using normalization rules associated with Lync dial plans. In the following screenshot, we can see the rules inside a dial plan:
Dial plans are applied starting from the global level and descending to the site level, then to the pool level, and lastly to the user level. The last policy plan in the aforementioned list is the only one that is applied, so that we are able to manage all kinds of exceptions. Enterprise Voice requires additional configuration, including the following:
In the past, it was a standard for companies that use a Private Branch Exchange (PBX) to rely on the behaviors and dialing habits of the users. A typical example was the requirement for digit 0 to keep the external line. The previously mentioned scenario changes completely with Lync Server 2013, which is based on a series of rules to normalize every telephone number to the E.164 standard with no user intervention required.
To define the base policies, we will use the Lync Dial Rule Optimizer tool by Ken Lasko. This tool provides great help in defining some voice-configuration aspects. In this first recipe, we will provide a quick overview of the tool and use specific parts to understand the logic behind a Lync voice configuration. We will come back to the tool in more detail in Chapter 5, Scripts and Tools for Lync.
Export-CsConfiguration –FileName "C:BackupLyncConfigBackUp.zip"
cmdlet for a complete backup of our Lync Server configuration. However, if we want to take a backup of only specific parts of the deployment, we can use the cmdlets shown in Chapter 10, Managing Lync 2013 Backup and Restore, in the Configuration information recipe..ps1
file required to create all the necessary rules and policies, as shown in the following screenshot:UK-London-Lync.Ps1
) when running, will just require the Site ID and a selection between the creation of user-level dial plans or site-level dial plans. Dial plan, voice policies, routes, PSTN usages, and trunk configuration are added automatically for the site, as shown in the following screenshot:The script itself is a complex one (and contains currently more than 700 lines). Part of the complexity is because a great number of parameters are controlled, adding flexibility to the result. It is also possible to manage the different options outside the user interface, running the following cmdlet with optional parameters (there is one example included inside the script, which shows how to apply least cost routing):
.UK-London-Lync.ps1 -SiteID 2 -DialPlanType User -LeastCostRouting:$TRUE -LCRSites 'US-NY-NewYorkCity,UK-London,SG-Singapore'
Talking about dial plans and voice routing, I suggest that you read an interesting post by Chris Williams, The Difference Between Dial Plans and Voice Routes at http://www.lyncinsider.com/lync-server-2013/the-difference-between-dial-plans-and-voice-routes/, which clarifies the difference between the two aspects of voice processing in Lync.
Another post that I suggest you read is Demystify Lync Enterprise Voice Phone Numbers and Extension by Thomas Poett at http://lyncuc.blogspot.it/2013/02/demystify-lync-enterprise-voice-phone.html. Thomas' work examines many aspects of Enterprise Voice, including phone number management and E.164 normalization.