.. _manage-ranges-of-dns:

E164 associations ( N to N DN )
----------------------------------

.. _20.1.1|EKB-5576:
.. _19.3.3|EKB-5576:
.. _21.4|EKB-7419:
.. _24.1|EKB-18789:


.. tip:: 

   :ref:`use-action-search-to-navigate-automate`



Overview 
...........

This topic describes managing a range of internal numbers (Directory Numbers, or DNs) 
associated with a range of E164 numbers.  




.. _view-associated-range-e164-dns:

View E164 associations (N to N DN)
......................................

To view the ranges of E164 numbers that are associated with a range of internal numbers 
(Directory Numbers, or DNs): 

1. In the Admin Portal, go to the **E164 Associations (N to N DN)** list view.
2. View E164 associations (N to N DN) in the list. 

   .. note:: 

      You can filter the list and change the hierarchy by selecting a 
      link in the **Located At** column.


   The table describes column data in the **E164 Associations ( N to N DN )** list view:

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

   +-------------+-----------------------------------------------------------------+
   | Column      | Description                                                     |
   +=============+=================================================================+
   | E164 Number | The starting E164 number in the range.                          |
   +-------------+-----------------------------------------------------------------+
   | DN Number   | The starting internal number in the range.                      |
   +-------------+-----------------------------------------------------------------+
   |             | One of the following:                                           |
   |             |                                                                 |
   |             | * 1 - To indicate that one E164 number and internal number      |
   |             |   are associated.                                               |
   |             | * 10 - To indicate that a range of ten numbers including the    |
   | Range       |   starting E164 and starting internal number are associated.    |
   |             | * 100 - To indicate that a range of 100 numbers including the   |
   |             |   starting E164 and starting internal number are associated.    |
   |             | * 1000 - To indicate that a range of 1000 numbers including the |
   |             |   starting E164 and starting internal number are associated.    |
   +-------------+-----------------------------------------------------------------+
   | Located At  | Indicates the hierarchy of the site where the E164 number       |
   |             | range and internal number range association was created.        |
   +-------------+-----------------------------------------------------------------+


.. _assoc-range-e164-numbers-to-range-dir-numbers:

Add an E164 association (N to N DN) 
.....................................

This procedure associates a range of E164 numbers to a range of internal numbers, at a site. 

.. note:: 
  
   * You can also perform the association in ranges of 10, 100, and 1000, on a one-to-one basis. 
     These associations create Direct Dial Inward (DDI) associations so that incoming PSTN 
     numbers are routed to internal numbers.

   * Only internal numbers or E164 numbers that are not currently associated, are
     available for association.

   * In Automate, the ``HcsSipLocalGwAddE164AssociationEVT`` event related to SIP
     Local Gateway is generated 
   


1. In the Admin Portal, go to the **E164 Associations (N to N DN)** list view.
#. Set the hierarchy to the relevant customer.
#. In the **E164 Associations ( N to N DN )** list view, click the Plus icon (+) to add a new record. Choose a site. 
#. Configure E164 Association ( N to N DN ). The table describes configuration options: 

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

   +---------------------------+------------------------------------------------------+
   | Field                     | Description                                          |
   +===========================+======================================================+
   |                           | Mandatory. Choose the range before choosing other    |
   |                           | settings on this page.                               |
   |                           |                                                      |
   |                           | Defines the range value for the E164 to DN           | 
   |                           | association. Options are: 1, 10, 100, or 1000        |
   |                           |                                                      |
   |                           | The range value you select maps to the mask value    |
   |                           | when the association translation pattern is created. |
   |                           | For example, when 10 is selected, all E164 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 non zero 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 E164 numbers and internal numbers  |
   |                           | * 10 - To list all E164 numbers and internal numbers |
   |                           |   that end in one zero (0)                           |
   |                           | * 100 - To list all E164 numbers and internal        |
   |                           |   numbers that end in two zeros (00)                 |
   |                           | * 1000 - To list all E164 numbers and internal       |
   |                           |   numbers that end in three zeros (000)              |
   +---------------------------+------------------------------------------------------+
   | E164 Number               | Mandatory. Choose the starting number of the range   |
   |                           | of E164 numbers.                                     |
   |                           |                                                      |
   |                           | * If the association is performed at customer level, |
   |                           |   the drop-down only shows E164 numbers that were    |
   |                           |   added at customer level.                           |
   |                           | * If the association is performed at site level, the |
   |                           |   drop-down contains E164 numbers that were added at |
   |                           |   either customer or site level provided the country |
   |                           |   matches the site's country.                        |
   +---------------------------+------------------------------------------------------+


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

   +---------------------------+------------------------------------------------------+
   | Field                     | Description                                          |
   +===========================+======================================================+
   |                           | Mandatory. Choose the starting internal number.      |
   |                           |                                                      |
   |                           | * If the association is performed at customer level, |
   | DN Number                 |   the drop-down only shows internal numbers that were|
   |                           |   added at customer level.                           |
   |                           | * If the association is performed at site level, the |
   |                           |   drop-down shows internal numbers that were added at|
   |                           |   either customer or site level.                     |
   |                           | * You cannot associate internal numbers that begin   |
   |                           |   with the prefix '*' (asterisk) or '#" (hash).      |
   +---------------------------+------------------------------------------------------+
   | Dial Plan Model Selection | This field displays only when the **Enforce HCS      |
   |                           | Dialplan Rules** setting in the **Global Settings**  | 
   |                           | is set to *False*                                    | 
   |                           |                                                      | 
   |                           | Defines the translation pattern template configured  |
   |                           | in the dial plan modeling tool. The values for the   |
   |                           | pattern, transform mask, and associated range        |
   |                           | masking are hard coded in the workflow.              |
   |                           | +1555 111 5555 (Range 10) = +1555 111 555X           |
   |                           |                                                      |
   |                           | Other values, such as partition and CSS) come from   |
   |                           | this template.                                       |
   |                           |                                                      |
   |                           | The translation pattern must have its description    |
   |                           | set to display in this drop-down.                    | 
   +---------------------------+------------------------------------------------------+

4. Save your changes.

   You can view transaction progress and details in the Transaction Logs. 

   .. note:: 

      * When listing the Number Inventory and displaying an internal number, the E164
        Number format is as listed in :ref:`e164-number-inventory-column`.
      * A translation pattern (which is the mapping between the E164 range and internal number range) 
        is created on the CUCM. This translation pattern is 
        used to route inbound PSTN calls to their associated internal numbers. 
      * If the association is performed at a Site, the translation pattern is only
        added to the CUCM referenced by the site's network device list (NDL).
      * If the association is performed at Customer level, the translation pattern
        is added to all the customer's CUCMs.
      * 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.


.. rubric:: Related Topics   
 
* 
  .. raw:: latex

     Transaction Logging and Audit in the Core Feature Guide

  .. raw:: html
  
     <a href="concepts-transaction-logging-audit.html">Transaction Logging and Audit</a>


Delete an E164 association (N to N DN) 
........................................

This procedure deletes one or more E164 (N to N DN) associations to 
disassociate a range of E164 numbers from a range of internal numbers.

.. note::
 
   In Automate, the ``HcsSipLocalGwDelE164AssociationEVT`` event related to SIP
   Local Gateway is generated as a result.


1. Go to the **E164 Associations ( N to N DN )** list view.
#. Change your hierarchy, if required. 
#. View E164 Associations (N to N DN) in the list, which displays the following information: 
   
   .. tabularcolumns:: |p{3cm}|p{12cm}|   

   +-------------+------------------------------------------------------+
   | Column      | Description                                          |
   +=============+======================================================+
   | E164 Number | The starting E164 number in the range.               |
   +-------------+------------------------------------------------------+
   | DN Number   | The starting DN number in the range.                 |
   +-------------+------------------------------------------------------+
   |             | * 1 - Indicates that one E164 number and internal    |
   |             |   number are associated                              |
   |             | * 10 - Indicates that a range of ten numbers         |
   |             |   including the starting E164 and starting internal  |
   | Range       |   number are associated                              |
   |             | * 100 -  Indicates that a range of 100 numbers       |
   |             |   including the starting E164 and starting internal  |
   |             |   number are associated                              |
   |             | * 1000 - Indicates that a range of 1000 numbers      |
   |             |   including the starting E164 and starting internal  |
   |             |   numbers are associated                             |
   +-------------+------------------------------------------------------+
   | Located At  | Indicates the hierarchy of the site where the E164   |
   |             | number range and internal number range association   |
   |             | was created.                                         |
   +-------------+------------------------------------------------------+

4. Choose an option:

   * To disassociate multiple ranges, select the check boxes in the far left column
     of the table for the ranges you want to disassociate.
   * To disassociate one range, click its row in the table. The details about the
     association appear.
      
5. Click **Delete**, then click **Yes** to confirm the disassociation.

   .. note:: 
 
      * The translation pattern mapping between the E164 range and internal number range
        is deleted from CUCM.
          
        The E164 number association with the internal number is removed on the Number
        Inventory list view display and in any **Lines** drop-down list and **Lines** displays. 
      
      * If the site has one or more SIP Local Gateways associated with it, the
        ``HcsSipLocalGwDelE164AssociationEVT`` event is generated. If enabled, the
        IOS Command Builder generates the default IOS commands associated with
        the event for each SIP Local Gateway.
