.. _concepts-config-mapping-files:


.. rst-class:: chapter-with-expand


Configuration Mapping Files
---------------------------

Configuration mapping is available for higher level administrators
as a part of the overall Business Administration Portal configuration as well as for other purposes.

The mappings serve a number of purposes:

* For phones and device profiles

  * Control the list of phone types available for selection.
  * Define the configuration settings used when a specific phone type is selected. 
  * Allow multiple configurations, for example different button templates for the same phone type.
  * Provide business-like, meaningful names for different phone type configurations rather than Unified CM defined names. For example: "Executive Phone with 2 lines".
  * Make use of phone type agnostic Configuration Templates (CFTs), allowing for the management of fewer CFTs in the system rather than a CFT per phone type.
* For lines, phones and device profiles

  * Define a set of "feature" templates that can be selected by the lower level administrator and customize the configuration of the applicable item,
    in other words, have "flavours" of configuration as required.
* For soft phones specifically

  * Provide CFTs to manage the move subscriber - handles the move of the subscriber's soft phones.


.. _concepts-config-BAP-phone-configuration-mapping:

Phone Configuration Mapping
...........................

.. note::

  * There may only be one Phone Configuration Mapping at any hierarchy.
  * The name of a Phone Configuration Mapping at any hierarchy must be ``Default``.


**Profiles**

These mapping profiles define a list of phone types that can be selected along with:

* Profile Name 
* Profile items:

  * Phone Type
  * Protocol
  * Button Template
  * Security Profile
  
* Base Configuration Template (CFT)

|new-bap-config-image3|

The value in the **Profile Name** field will be presented to the lower level
administrator user in **Phone** drop-downs inside the administration portal. 

For example, if the administrator selects "Cisco 7841", then:

* the phone will be provisioned as a "Cisco 7841" SIP device
* with "Standard 7841 SIP" button template
* and the "Cisco 7841 - Standard SIP Non-Secure Profile" security profile.
* Additionally, all configuration captured in the **Basic Configuration Template**,
  called "Basic Phone CFT" will also be used.


|new-bap-config-image5|

.. note::

   The **Base Configuration Template** as well as the **Feature Configuration Template**
   may also contain profile item fields such as **Phone Type** and **Protocol**.
   In this case, the order of precedence for the values is:

   1. Feature Configuration Template
   2. Base Configuration Template
   3. Profile items

   For example, a phone type specified in the **Phone Type** field under **Profiles**
   will be superceded by the phone type specified in the **Base Configuration Template**
   or **Feature Configuration Template**.

**Feature Templates**

The "Feature Templates" section of the Phone and Device Profile configuration
mapping allows a higher level administrator to configure a list of **Feature
Configuration Template** CFTs providing different configurations to complete the
setting of the phone, device profile or line.

A list of Feature templates available:

|new-bap-config-image1|

These will be presented to the lower level administrator as the list of templates
(phone, device profile or line) for selection when
adding a phone or extension mobility or line and will contain the additional configuration settings that
are applied on top of the settings mentioned above.

|new-bap-config-image8|



**Configuration Template Input Contexts**

The following context macro variables are available when defining configuration
templates for the phone mappings above.


+------------------------------------------+----------------------------------------+
| Macro                                    |   Description                          |
+==========================================+========================================+
|                                          |  Flag whether it is a standalone phone |
| ``{{ input.standalone }}``               |  or being associated with a            |
|                                          |  subscriber.                           |
+------------------------------------------+----------------------------------------+
|                                          |  Username of the subscriber the phone  |
| ``{{ input.username }}``                 |  is being associated with. Only when   |
|                                          |  standalone is false.                  |
+------------------------------------------+----------------------------------------+
|                                          |  The user selected device type. This   |
| ``{{ input.device_type }}``              |  in fact is the phone mapping profile  |
|                                          |  name.                                 |
+------------------------------------------+----------------------------------------+
| ``{{ input.template_name }}``            |  The user selected feature template.   |
+------------------------------------------+----------------------------------------+
| ``{{ input.name }}``                     |  The user entered phone name.          |
+------------------------------------------+----------------------------------------+
| ``{# input.lines #}``                    |  The user entered list of lines.       |
+------------------------------------------+----------------------------------------+
| ``{{ input.lines.0.directory_number }}`` |   The number of the first line.        |
+------------------------------------------+----------------------------------------+
| ``{{ input.lines.0.template_name }}``    |  The user selected line template.      |
+------------------------------------------+----------------------------------------+
| ``{{ input.lines.0.label }}``            |  The user entered line label.          |
+------------------------------------------+----------------------------------------+
| ``{{ input.lines.0.display }}``          |  The user entered line display.        |
+------------------------------------------+----------------------------------------+
|                                          |  Object containing all UCM user        |
| ``{{ pwf.user }}``                       |  settings of the associated            |
|                                          |  subscriber. Only when standalone is   |
|                                          |  false.                                |
+------------------------------------------+----------------------------------------+



.. |new-bap-config-image3| image:: /src/images/new-bap-config-image3.png
.. |new-bap-config-image5| image:: /src/images/new-bap-config-image5.png
.. |new-bap-config-image8| image:: /src/images/new-bap-config-image8.png
.. |new-bap-config-image1a| image:: /src/images/new-bap-config-image1a.png
.. |new-bap-config-image1| image:: /src/images/new-bap-config-image1.png



.. _concepts-config-BAP-device-profile-configuration-mapping:

Device Profile Configuration Mapping
....................................

.. note::

  * There may only be one Device Profile Configuration Mapping at any hierarchy.
  * The name of a Device Profile Configuration Mapping at any hierarchy must be ``Default``.

The setup for Device Profile configuration mapping is identical to that
for Phone Configuration Mappings.

The phone type list and feature templates are presented to the administrator
when adding an extension mobility service to a subscriber via the subscriber management page.
See *Feature Templates* under :ref:`concepts-config-BAP-phone-configuration-mapping`.

|new-bap-config-image7|


.. |new-bap-config-image7| image:: /src/images/new-bap-config-image7.png



.. _concepts-config-BAP-line-templates-configuration-mapping:

Line Templates
..............

.. note::

  * There may only be one Line Configuration Mapping at any hierarchy.
  * The name of a Line Configuration Mapping at any hierarchy must be ``Default``.

A list of line templates can be configured and these will be presented to
the administrator when new lines are be created, for example when adding a new
phone.

The following context macro variables are available when defining configuration
templates for the line mappings.
See *Feature Templates* under :ref:`concepts-config-BAP-phone-configuration-mapping`.

+---------------------------------------------------+---------------------------------------+
| Macro                                             |   Description                         |
+===================================================+=======================================+
| ``{{ input.userid }}``                            |  User ID for description.             |
+---------------------------------------------------+---------------------------------------+
| ``{{ pwf.PassedLine.pattern }}``                  |  Line pattern description.            |
+---------------------------------------------------+---------------------------------------+
|                                                   |  User first name for Alerting name or |
| ``{{ input.firstName }}``                         |  ASCII Alerting name.                 |
+---------------------------------------------------+---------------------------------------+
|                                                   |  User last name for Alerting name or  |
| ``{{ input.lastName }}``                          |  ASCII Alerting name.                 |
+---------------------------------------------------+---------------------------------------+
| ``{{ input.Phone.0.lines.line.0.dirn.pattern }}`` |  The destination.                     |
+---------------------------------------------------+---------------------------------------+


The following are named macros that can be used when defining configuration
templates for the line mappings above. High level administrators with access
to ``data/Macro`` can inspect and evaluate these named macros to verify result
values. For details on Configuration Template customizations,
refer to the Advanced Configuration Guide.

* For ``callingSearchSpaceName``:

  ::
  
    {{ macro.CUCM_LINE_callForwardAll_callingSearchSpaceName }}
    {{ macro.CUCM_LINE_callForwardAlternateParty_callingSearchSpaceName }}
    {{ macro.CUCM_LINE_callForwardBusy_callingSearchSpaceName-2 }}
    {{ macro.CUCM_LINE_callForwardBusyInt_callingSearchSpaceName }}
    {{ macro.CUCM_LINE_callForwardNoAnswer_callingSearchSpaceName }}
    {{ macro.CUCM_LINE_callForwardNoAnswerInt_callingSearchSpaceName }}
    {{ macro.CUCM_LINE_callForwardNoCoverage_callingSearchSpaceName }}
    {{ macro.CUCM_LINE_callForwardNoCoverageInt_callingSearchSpaceName }}
    {{ macro.CUCM_LINE_callForwardNotRegistered_callingSearchSpaceName }}
    {{ macro.CUCM_LINE_callForwardOnFailure_callingSearchSpaceName }}
    {{ macro.CUCM_LINE_callForwardOnFailure_callingSearchSpaceName }}

* For ``presenceGroupName``

  ::

     {{ macro.CUCM_LINE_presenceGroupName }}

* For ``routePartitionName``

  ::

     {{ macro.CUCM_LINE_routePartitionName }}

* For ``secondaryCallingSearchSpaceName``

  ::

     {{ macro.CUCM_LINE_callForwardAll_secondaryCallingSearchSpaceName }}


* For ``voiceMailProfileName``

  ::
 
     {{ macro.CUCM_LINE_vmprofile }}




|new-bap-config-image2|

.. |new-bap-config-image2| image:: /src/images/new-bap-config-image2.png