.. _associate_range_e164_numbers_to_range_directory_numbers:

Associate a Range of E.164 Numbers to a Range of Directory Numbers
------------------------------------------------------------------

Use this procedure to associate a range of E.164 numbers with a range of
directory numbers (DN) at a customer or site. These associations create
Direct Dial Inward (DDI) associations so that incoming PSTN numbers are
routed to directory numbers.

If you create the association at a site, you can mix customer-level DNs
and E.164 numbers with site-level DNs and E.164 numbers.

.. note::

   * In VOSS-4-UC, the event related to SIP Local Gateway is generated as a result.
   * Only DNs or E.164 numbers that are not currently associated are available for
     association.

Procedure
.........

1. Log in as provider, reseller, customer, or site administrator.
2. Set the hierarchy path to point to the customer or site where you want
   to associate E.164 numbers with directory numbers.
3. Choose **Dial Plan Management > Number Management > E164 Associations (N to N DN)**.
4. Click **Add**.
5. Provide the following information:

.. tabularcolumns:: |p{3cm}|p{12cm}|

+-------------+------------------------------------------------------+
| Field       | Description                                          |
+=============+======================================================+
|             | Select one of these ranges:                          |
|             |                                                      |
|             | Note:                                                |
|             |                                                      |
|             | The range values you select map to the mask value    |
|             | when the association translation pattern is created. |
|             | For example, when 10 is selected, all E.164 numbers  |
|             | and directory numbers that end in 0 are listed. The  |
|             | mask affects all digits 0 to 9, so you can't start   |
|             | the mask on a nonzero number. Likewise, when 100 is  |
|             | selected, the E.164 number and DN end in two zeros.  |
|             | This pattern results in a mask of XX.                |
|             |                                                      |
| Range       | * 1 - To list all E.164 numbers and DNs              |
|             | * 10 - To list all E.164 numbers and DNs that end    |
|             |   in one zero (0)                                    |
|             | * 100 - To list all E.164 numbers and DNs that end   |
|             |   in two zeros (00)                                  |
|             | * 1000 - To list all E.164 numbers and DNs that      |
|             |   end in three zeros (000)                           |
|             |                                                      |
|             | This field is mandatory and affects what appears in  |
|             | the fields that follow.                              |
+-------------+------------------------------------------------------+
|             | Choose the starting number of the range of E.164     |
|             | numbers from the drop-down menu. For a               |
| E164 Number | customer-level association, only customer-level      |
|             | E.164 numbers are available. For a site-level        |
|             | configuration, both customer-level and site-level    |
|             | E.164 numbers are available. This field is mandatory.|
+-------------+------------------------------------------------------+
|             | Choose the starting extension number from the        |
|             | drop-down menu. This field is mandatory.             |
|             |                                                      |
| DN Number   | Note:                                                |
|             |                                                      |
|             | You cannot associate extension numbers that begin    |
|             | with the prefix '*' (asterisk) or '#" (hash).        |
+-------------+------------------------------------------------------+

6. Click **Save**.

   * When listing the Directory Number Inventory and displaying a directory number,
     the E.164 Number format is as listed in :ref:`view_directory_number_inventory`.
   * For a site-level association, a translation pattern that is used to route
     inbound PSTN calls to their associated DNs is created on the Unified CM.
     This pattern is the mapping between the E.164 range and DN range.
   * For a customer-level association, a translation pattern is created on
     each Unified CM cluster that has a dial plan provisioned.
   * For a site-level association, if the site has one or more SIP Local Gateways
     associated with it, the HcsSipLocalGwAddE164AssociationEVT event is generated.
     If enabled, the IOS Command Builder generates the default IOS commands
     associated with the event for each SIP Local Gateway.
   * For a customer-level association, if the E.164 number has the same country
     as any SIP Local Gateway configured for the customer, the
     HcsSipLocalGwAddE164AssociationEVT event is generated. If enabled, the IOS
     Command Builder generates the default IOS commands associated with the event
     for each SIP Local Gateway.