.. _custom_line_settings_for_smart_add_phone: Custom Line Settings for Smart Add Phone Configuration Template --------------------------------------------------------------- .. _18.1-Patch-Bundle-3|EKB-790: In order to customize the line settings of a custom Configuration Template to be used specifically with the Smart Add Phone feature, the cloned, customized template should be exported as a JSON file and edited manually. Consider the ``data`` attribute snippet of an example Phone template JSON file *before* customization for custom lines: :: "data": { "description": "Custom CUCM Phone Template", "name": "Custom Cisco 7945", "target_model_type": "device/cucm/Phone", "template": { "protocol": "SCCP", "softkeyTemplateName": "Standard Agent", "phoneTemplateName": "Standard 7945 SCCP", "callingSearchSpaceName": "(( input.Phone.callingSearchSpaceName == None )) \ <{{macro.CUCM_PHONE_callingSearchSpaceName}}> \ <{{input.Phone.callingSearchSpaceName}}>", "servicesUrl": "Both", "builtInBridgeStatus": "On", "useTrustedRelayPoint": "Default", "userlocale": "English United States", "enableExtensionMobility": "(( True ))", "commonDeviceConfigName": "Agent_CDC", "networkLocale": "United States", "packetCaptureMode": "None", "product": "Cisco 7945", "description": "Created by Custom Phone Template", "userLocale": "English United States", "deviceMobilityMode": "On", "certificateOperation": "No Pending Operation", "class": "Phone", "securityProfileName": "Cisco 7945 - Standard SCCP Non-Secure Profile", "protocolSide": "User", "commonPhoneConfigName": "Standard Common Phone Profile" ... To customize this template for use with the Smart Add Phone feature and to add custom line settings, it requires additional elements in the ``data`` attribute group: * A ``foreach`` loop method over lines with a line variable, e.g. ``LineX``: :: "foreach": [ { "property": "lines.line", "context_var": "LineX", "macro_list": "{# input.lines #}" } ], * Line specific customization for each line added on the Smart Add Phone input form on the Admin Portal represented by an attribute ``lines`` that contains a ``line`` list. An example is shown below: :: "lines": { "line": [ { "maxNumCalls": "2", "displayAscii": "Test Site Phone", "busyTrigger": "1", "label": "{{ cft.LineX.directory_number }}", "e164Mask": "8005551212", "callInfoDisplay": { "dialedNumber": "(( True ))", "callerName": "(( True ))" }, "asciiLabel": "{{ cft.LineX.directory_number }}", "display": "Test Site Phone" } ] } * Added attribute to template called ``merge_strategy`` and set to ``replace``. The example ``data`` attribute group below shows the additional customization integrated into the template. This template can then be selected from the **Phone Template** dropdown to customize the phone's line settings: :: "data": { "name": "Custom Cisco 7945", "description": "Custom Smart Add Phone Template - Cisco 7945", "foreach": [ { "property": "lines.line", "context_var": "LineX", "macro_list": "{# input.lines #}" } ], "merge_strategy": "replace", "target_model_type": "device/cucm/Phone", "template": { "protocol": "SCCP", "softkeyTemplateName": "Standard Agent", "phoneTemplateName": "Standard 7945 SCCP", "callingSearchSpaceName": "(( input.Phone.callingSearchSpaceName == None )) \ <{{macro.CUCM_PHONE_callingSearchSpaceName}}> \ <{{input.Phone.callingSearchSpaceName}}>", "servicesUrl": "Both", "builtInBridgeStatus": "On", "useTrustedRelayPoint": "Default", "userlocale": "English United States", "enableExtensionMobility": "(( True ))", "commonDeviceConfigName": "Agent_CDC", "networkLocale": "United States", "packetCaptureMode": "None", "product": "Cisco 7945", "description": "Created by Custom Phone Template", "userLocale": "English United States", "deviceMobilityMode": "On", "certificateOperation": "No Pending Operation", "class": "Phone", "securityProfileName": "Cisco 7945 - Standard SCCP Non-Secure Profile", "protocolSide": "User", "commonPhoneConfigName": "Standard Common Phone Profile", "lines": { "line": [ { "maxNumCalls": "2", "displayAscii": "Test Site Phone", "busyTrigger": "1", "label": "{{ cft.LineX.directory_number }}", "e164Mask": "8005551212", "callInfoDisplay": { "dialedNumber": "(( True ))", "callerName": "(( True ))" }, "asciiLabel": "{{ cft.LineX.directory_number }}", "display": "Test Site Phone" } ] }, ... .. |VOSS Automate| replace:: VOSS Automate .. |Unified CM| replace:: Unified CM