Lync Server 2013 中的拨号计划和规范化规则Dial plans and normalization rules in Lync Server 2013

 

上次修改的主题: 2012-09-21Topic Last Modified: 2012-09-21

拨号计划是一组指定的规范化规则,可将指定位置、单个用户或联系人对象的电话号码转换为统一标准 (E.164) 格式,以进行电话授权和呼叫路由。A dial plan is a named set of normalization rules that translates phone numbers for a named location, individual user, or contact object into a single standard (E.164) format for purposes of phone authorization and call routing.

规范化规则定义如何针对每个指定的位置、用户或联系人对象来路由以不同格式表示的电话号码。Normalization rules define how phone numbers expressed in various formats are to be routed for each specified location, user, or contact object. 相同的拨号字符串可能会以不同的方式进行解释和转换,具体取决于拨打该号码的位置以及进行呼叫的人员或联系人对象。The same dial string may be interpreted and translated differently, depending on the location from which it is dialed and the person or contact object making the call.

拨号计划作用域Dial Plan Scope

拨号计划的“作用域”** 决定了拨号计划的应用层级。A dial plan’s scope determines the hierarchical level at which the dial plan can be applied. 在 Lync Server 中,可以为用户分配特定的每用户拨号计划。In Lync Server, a user can be assigned a specific per-user dial plan. 如果没有分配用户拨号计划,则会应用注册器池拨号计划。If a user dial plan is not assigned, the Registrar pool dial plan is applied. 如果没有注册器池拨号计划,则会应用站点拨号计划。If there is no Registrar pool dial plan, the site dial plan is applied. 最后,如果没有其他适用于该用户的拨号计划,则会应用全局拨号计划。Finally, if there is no other dial plan applicable to the user, the global dial plan is applied.

客户端通过在用户登录 Lync Server 时提供的带内设置设置获取拨号计划作用域级别。Clients obtain dial plan scope levels through in-band provisioning settings that are provided when users log on to Lync Server. 作为管理员,您可以使用 Lync Server 控制面板管理和分配拨号计划作用域级别。As the administrator, you can manage and assign dial plan scope levels by using Lync Server Control Panel.

备注

服务级别公用电话交换网 (PSTN) 网关拨号计划应用于来自特定网关的传入呼叫。The service level public switched telephone network (PSTN) gateway dial plan is applied to the incoming calls from a particular gateway.

拨号计划作用域级别定义如下:Dial plan scope levels are defined as follows:

  • 用户拨号计划: 可分配给各个用户、组或联系人对象。User dial plan: Can be assigned to individual users, groups, or contact objects. 在收到呼叫时,语音应用程序可以查找每用户拨号计划,并将手机上下文设置为 "用户-默认"。Voice applications can look up a per-user dial plan when a call is received with the phone-context set to user-default. 出于分配拨号计划的目的,contact 对象被视为单个用户。For the purpose of assigning a dial plan, a contact object is treated as an individual user.

  • 池拨号计划: 可在您的拓扑中的任何 PSTN 网关或注册器的服务级别创建。Pool dial plan: Can be created at the service level for any PSTN gateway or Registrar in your topology. 要定义池拨号计划,必须指定要应用拨号计划的特定服务(PSTN 网关或注册器池)。To define a pool dial plan, you must specify the particular service (PSTN gateway or Registrar pool) to which the dial plan applies.

  • 网站拨号计划: 可以为整个网站创建,但分配了池拨号计划或用户拨号计划的任何用户、组或联系人对象除外。Site dial plan: Can be created for an entire site, except for any users, groups, or contact objects that are assigned a pool dial plan or user dial plan. 要定义站点拨号计划,必须指定要应用拨号计划的站点。To define a site dial plan, you must specify the site to which the dial plan applies.

  • 全局拨号计划: 随产品一起安装的默认拨号计划。Global dial plan: The default dial plan installed with the product. 可以编辑全局拨号计划,但无法将其删除。You can edit the global dial plan, but you cannot delete it. 此拨号计划适用于部署中的所有企业语音用户、组和联系人对象,除非您使用更具体的作用域配置和分配拨号计划。This dial plan applies to all Enterprise Voice users, groups, and contact objects in your deployment, unless you configure and assign a dial plan with a more specific scope.

规划拨号计划Planning for Dial Plans

若要规划拨号计划,请按照以下步骤操作:To plan a dial plan, follow these steps:

  • 列出组织拥有 office 的所有区域设置。List all the locales in which your organization has an office.

    列表必须是最新的,并且是完整的。The list must be up-to-date and complete. 随着公司的发展,将需要对该列表进行修订。It will need to be revised as company organization evolves. 在具有多个小型分支机构的大型跨国公司中,这可能是一项非常耗时的任务。In a large, multinational company with numerous small branch offices, this can be a time-consuming task.

  • 标识每个网站的有效数字模式。Identify valid number patterns for each site.

    在规划拨号计划时,最耗时的任务就是确定每个站点的有效号码模式。在某些情况下,尤其是当相应站点位于同一个国家/地区甚至同一个大陆上时,可以将为一个拨号计划编写的规范化规则复制到其他拨号计划中。在另一些情况下,只需对一个拨号计划中的号码进行微小的更改即可将这些号码用于其他拨号计划。The most time-consuming part of planning your dial plans is identifying the valid number patterns for each site. In some cases, you may be able to copy normalization rules that you have written for one dial plan to other dial plans, especially if the corresponding sites are within the same country/region or even continent. In other cases, small changes to numbers in one dial plan may be enough to use them in other dial plans.

  • 开发用于命名拨号计划的组织范围的方案。Develop an organization-wide scheme for naming dial plans.

    实行标准命名方案可确保组织内的一致性,并使维护和更新更加容易。Adopting a standard naming scheme assures consistency across an organization and makes maintenance and updates easier.

  • 确定单个位置是否需要多个拨号计划。Decide whether multiple dial plans are required for a single location.

    如果您的组织在多个位置维护单个拨号计划,您可能仍需要为企业语音用户创建一个单独的拨号计划,这些用户是从专用分支 exchange (PBX) 迁移的,并且需要保留其现有扩展的用户。If your organization maintains a single dial plan across multiple locations, you may still need to create a separate dial plan for Enterprise Voice users who are migrating from a private branch exchange (PBX) and who need to have their existing extensions retained.

  • 确定是否需要每用户拨号计划。Decide whether per-user dial plans are required. 例如,如果在使用中央站点注册的分支站点上有用户,或者如果您拥有在 Survivable 分支设备上注册的用户,则可以考虑使用每用户拨号计划和规范化规则的此类用户的特殊拨号方案。For example, if you have users at a branch site who are registered with the central site or if you have users who are registered on a Survivable Branch Appliance, you can consider special dialing scenarios for such users using per-user dial plans and normalization rules. 有关详细信息,请参阅 Lync Server 2013 的分支站点恢复要求For details, see Branch-site resiliency requirements for Lync Server 2013.

  • 按照本主题前面所述,确定拨号计划作用域 () 。Determine dial plan scope (as previously described in this topic).

若要创建拨号计划,请根据需要通过使用 Lync Server 控制面板或 Lync Server 命令行管理程序来指定以下字段中的值。To create a dial plan, you specify values in the following fields, as required, by using Lync Server Control Panel or Lync Server Management Shell.

名称和简单名称Name and Simple Name

对于用户拨号计划,应指定用于标识将向其分配拨号计划的用户、组或联系人对象的描述性名称。For user dial plans, you should specify a descriptive name that identifies the users, groups, or contact objects to which the dial plan will be assigned. 对于站点拨号计划,“名称”字段会使用站点名称预先填充,且不能更改。For site dial plans, the Name field is prepopulated with the site name and cannot be changed. 对于池拨号计划,"名称" 字段会使用 PSTN 网关或前端池完全限定域名预填充 (FQDN) ,并且无法更改。For pool dial plans, the Name field is prepopulated with the PSTN gateway or Front End pool fully qualified domain name (FQDN) and cannot be changed.

拨号计划“简单名称”** 会使用派生自拨号计划名称的字符串预先填充。The dial plan Simple Name is prepopulated with a string that is derived from the dial plan name. "简单名称" 字段是可编辑的,这使您可以为拨号计划创建更具描述性的命名约定。The Simple Name field is editable, which enables you to create a more descriptive naming convention for your dial plans. **“简单名称”值不能为空,且必须是唯一的。The Simple Name value cannot be empty and must be unique. 最佳做法是为整个组织制定命名约定,然后在所有网站和用户中一致地使用此约定。A best practice is to develop a naming convention for your entire organization and then use this convention consistently across all sites and users.

说明Description

建议您键入一个要应用相应的拨号计划的通用可辨识地理位置名称。例如,如果拨号计划的名称是 London.Contoso.com,则建议的说明将为 London。We recommend that you type the common, recognizable name of the geographic location to which the corresponding dial plan applies. For example, if the dial plan name is London.Contoso.com, the recommended description would be London.

电话拨入式会议区域Dial-in Conferencing Region

如果要部署电话拨入式会议,则需要指定电话拨入式会议区域,以将电话拨入式会议访问号码与拨号计划关联起来。If you are deploying dial-in conferencing, you will need to specify a dial-in conferencing region to associate dial-in conferencing access numbers with a dial plan.

外部访问前缀External Access Prefix

您可以指定一个外部访问前缀(最多四个字符) (# 、 * 和 0-9) 如果用户需要拨打一个或多个附加的前导数字 (例如,9) 获取外部线路。You can specify an external access prefix of up to four characters (#, *, and 0-9) if users need to dial one or more additional leading digits (for example, 9) to get an external line.

备注

如果指定了外部访问前缀,则不需要另外创建规范化规则来满足前缀。If you specify an external access prefix, you do not need to create an additional normalization rule to accommodate the prefix.

规范化规则Normalization Rules

规范化规则定义如何针对命名的位置来路由以不同格式表示的电话号码。Normalization rules define how phone numbers expressed in various formats are to be routed for the named location. 相同的号码字符串可能会以不同的方式进行解释和转换,具体取决于从中拨号的区域设置。The same number string may be interpreted and translated differently, depending on the locale from which it is dialed. 规范化规则是呼叫路由所必需的,因为用户在其联系人列表中输入电话号码时,可以而且确实会使用各种格式。Normalization rules are necessary for call routing because users can, and do, use various formats when entering phone numbers in their Contacts lists.

规范化用户提供的电话号码提供了一个一致的格式,可促进以下任务:Normalizing user-supplied phone numbers provides a consistent format that facilitates the following tasks:

  • 将已拨打的号码与预期收件人的 SIP URI 进行匹配。Match a dialed number to the intended recipient’s SIP-URI.

  • 将拨号授权规则应用于呼叫方。Apply dialing authorization rules to the calling party.

规范化规则可能需要考虑下列号码字段:The following number fields are among those that your normalization rules may need to account for:

  • 拨号计划Dial plan

  • 国家/地区代码Country code

  • 区域代码Area code

  • 分机号长度Length of extension

  • 站点前缀Site prefix

创建规范化规则Creating Normalization Rules

规范化规则使用 .NET Framework 正则表达式指定数字匹配模式,服务器使用该模式将拨号串转换为 E.164 格式,以便执行反向号码查找。Normalization rules use .NET Framework regular expressions to specify numeric match patterns that the server uses to translate dial strings to E.164 format for the purpose of performing reverse number lookup. 您可以在 Lync Server 控制面板中创建规范化规则,方法是手动输入表达式,或者输入起始数字和要匹配的拨号字符串的长度,让 Lync Server 控制面板为您生成相应的正则表达式。You create normalization rules in the Lync Server Control Panel either by entering the expressions manually, or by entering the starting digits and the length of the dial strings to be matched and letting the Lync Server Control Panel generate the corresponding regular expression for you. 无论采用何种方式,完成操作后,都可以输入一个测试号码来验证规范化规则能否按预期工作。Either way, when you finish, you can enter a test number to verify that the normalization rule works as expected.

有关使用 .NET Framework 正则表达式的详细信息,请参阅位于的 ".NET Framework 正则表达式" https://go.microsoft.com/fwlink/p/?linkId=140927For details about using .NET Framework regular expressions, see ".NET Framework Regular Expressions" at https://go.microsoft.com/fwlink/p/?linkId=140927.

规范化规则示例Sample Normalization Rules

下表显示以 .NET Framework 正则表达式编写的规范化规则示例。这些仅为示例,不应作为创建自己的规范化规则时的规定性参考。The following table shows sample normalization rules that are written as .NET Framework regular expressions. The samples are examples only and are not meant to be a prescriptive reference for creating your own normalization rules.

表 1. 使用 .NET Framework 正则表达式的规范化规则Table 1.Normalization Rules Using .NET Framework Regular Expressions

规则名称Rule name 说明Description 号码模式Number pattern TranslationTranslation 示例Example

4digitExtension4digitExtension

转换 4 位分机号Translates 4-digit extensions

^ ( \d {4}) $^(\d{4})$

+ 1425555 $ 1+1425555$1

将 0100 转换为 +142555501000100 is translated to +14255550100

5digitExtension5digitExtension

转换 5 位分机号Translates 5-digit extensions

^ 5 ( \d {4}) $^5(\d{4})$

+ 1425555 $ 1+1425555$1

将 50100 转换为 +1425555010050100 is translated to +14255550100

7digitcallingRedmond7digitcallingRedmond

将 7 位号码转换为雷德蒙德本地号码Translates 7-digit numbers to Redmond local numbers

^ ( \d {7}) $^(\d{7})$

+ 1425 $ 1+1425$1

将 5550100 转换为 +142555501005550100 is translated to +14255550100

7digitcallingDallas7digitcallingDallas

将 7 位号码转换为达拉斯本地号码Translates 7-digit numbers to Dallas local numbers

^ ( \d {7}) $^(\d{7})$

+ 1972 $ 1+1972$1

将 5550100 转换为 +197255501005550100 is translated to +19725550100

10digitcallingUS10digitcallingUS

转换美国的 10 位号码Translates 10-digit numbers in the United States

^ ( \d {10}) $^(\d{10})$

+ 1 $ 1+1$1

将 2065550100 转换为 +120655501002065550100 is translated to +12065550100

LDCallingUSLDCallingUS

用美国的长途前缀转换号码Translates numbers with long distance prefixes in the United States

^ 1 ( \d {10}) $^1(\d{10})$

+ $1+$1

将 12145550100 转换为 +214555010012145550100 is translated to +2145550100

IntlCallingUSIntlCallingUS

用美国的国际前缀转换号码Translates numbers with international prefixes in the United States

^ 011 ( \d \* ) $^011(\d\*)$

+ $1+$1

将 01191445550100 转换为 +9144555010001191445550100 is translated to +91445550100

RedmondOperatorRedmondOperator

将 0 转换为雷德蒙德号码Translates 0 to Redmond Operator

^ $0^0$

+ 14255550100+14255550100

将 0 转换为 +142555501000 is translated to +14255550100

RedmondSitePrefixRedmondSitePrefix

用网内前缀 (6) 和雷德蒙德站点代码 (222) 转换号码Translates numbers with on-net prefix (6) and Redmond site code (222)

^ 6222 ( \d {4}) $^6222(\d{4})$

+ 1425555 $ 1+1425555$1

将 62220100 转换为 +1425555010062220100 is translated to +14255550100

NYSitePrefixNYSitePrefix

用网内前缀 (6) 和纽约站点代码 (333) 转换号码Translates numbers with on-net prefix (6) and NY site code (333)

^ 6333 ( \d {4}) $^6333(\d{4})$

+ 1202555 $ 1+1202555$1

将 63330100 转换为 +1202555010063330100 is translated to +12025550100

DallasSitePrefixDallasSitePrefix

用网内前缀 (6) 和达拉斯站点代码 (444) 转换号码Translates numbers with on-net prefix (6) and Dallas site code (444)

^ 6444 ( \d {4}) $^6444(\d{4})$

+ 1972555 $ 1+1972555$1

将 64440100 转换为 +1972555010064440100 is translated to +19725550100

下表基于上表中显示的规范化规则,说明了美国华盛顿雷德蒙德的示例拨号计划。The following table illustrates a sample dial plan for Redmond, Washington, United States, based on the normalization rules shown in the previous table.

表 2. 基于表 1 中所示规范化规则的雷德蒙德拨号计划Table 2. Redmond Dial Plan Based on Normalization Rules Shown in Table 1

Redmond forestFQDNRedmond.forestFQDN

5digitExtension5digitExtension

7digitcallingRedmond7digitcallingRedmond

10digitcallingUS10digitcallingUS

IntlCallingUSIntlCallingUS

RedmondSitePrefixRedmondSitePrefix

NYSitePrefixNYSitePrefix

DallasSitePrefixDallasSitePrefix

RedmondOperatorRedmondOperator

备注

上表中显示的规范化规则名称不包括空格,但是您可以选择包括空格。例如,表中的第一个名称可以写作“5 digit extension”或“5-digit Extension”,这些名称仍然有效。The normalization rules names shown in the preceding table do not include spaces, but this is a matter of choice. The first name in the table, for example, could have been written "5 digit extension" or "5-digit Extension" and still be valid.