.. _concepts-config-mapping-files:


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


Configuration Mapping for Phones, DeviceProfiles, and Lines
------------------------------------------------------------

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

The table describes the purpose of configuration mapping:

=============================== ===========================================================
Type                            Purpose

For phones and device profiles  * Define the phones 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-friendly names for different phone
                                  type configurations, rather than CUCM-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 for each phone type.

For lines, phones and device    Define a set of feature templates for use by lower-level
profiles                        administrators, and customize the configuration of the
                                applicable item. This allows you to have different
                                versions of configuration, as required.

For soft phones (specifically)  Provide CFTs to manage the process of moving
                                the soft phones of subscribers.
=============================== ===========================================================


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

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

There may only be one phone configuration mapping at any hierarchy. This
phone configuration mapping must be ``Default``.

.. rubric:: Mapping Profiles

The mapping profiles define the list of phone types that can be selected, and
includes:

* 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 is presented to the lower-level
administrator user in **Phone** drop-downs in the Admin Portal.

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

* The phone is provisioned as a "Cisco 7841" SIP device
* The phone will have a button template called *Standard 7841 SIP*
* The phone will a security profile called *Cisco 7841 - Standard SIP Non-Secure Profile*
* The phone configuration will come from a basic CFT called *Basic Phone CFT*


|new-bap-config-image5|

.. note::

   The *Base Configuration Template* and 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**
   is superceded by the phone type specified in the *Base Configuration Template* or
   the *Feature Configuration Template*.


.. rubric:: 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.

The image shows the list of available Feature templates:

|new-bap-config-image1|

The Feature templates are presented to the lower-level administrator as the list of templates
(phone, device profile or line) that can be chosen when adding either a phone,
extension mobility, or line. The *Feature* templates will contain the additional
configuration settings that are applied on top of the settings mentioned above.

|new-bap-config-image8|



.. rubric:: Macros for Phone Configuration Mapping

The table describes the available context macro variables when defining configuration
templates for the phone mappings:


+------------------------------------------+----------------------------------------+
| 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
....................................

There may only be one device profile configuration mapping at any hierarchy, and the
name of this mapping (at any hierarchy) must be ``Default``.

The setup for device profile configuration mapping is identical to the phone configuration
mapping. 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 Configuration Mapping
...........................

There may only be one line configuration mapping at any hierarchy, and this
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.


.. rubric:: Macros for Line Configuration Mapping

The table describes the available context macro variables when defining configuration
templates for the line mappings:

+---------------------------------------------------+---------------------------------------+
| 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 table describes the named macros that can be used when defining configuration
templates for the line mappingse. 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, see 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