diff --git a/resources/templates/provision/yealink/t21p/{$mac}.cfg b/resources/templates/provision/yealink/t21p/{$mac}.cfg index dd5989b706..0bf5a75dc9 100644 --- a/resources/templates/provision/yealink/t21p/{$mac}.cfg +++ b/resources/templates/provision/yealink/t21p/{$mac}.cfg @@ -2928,8 +2928,9 @@ network.internet_port.gateway = #The default value equals to the value of x. For example, the default value of the parameter "linekey.1.line" is 1. #linekey.x.lable--Define the label for each line key. Meet-Me Conference "1" or BLF "16" require pick_value. -{foreach $keys as $row} -{if $row.device_key_category == "line"} + +{foreach $keys['line'] as $row} + #Configure Line Key {$row.device_key_id} linekey.{$row.device_key_id}.line = {$row.device_key_line} linekey.{$row.device_key_id}.value = {$row.device_key_value} @@ -2942,7 +2943,7 @@ linekey.{$row.device_key_id}.type = {$row.device_key_type} linekey.{$row.device_key_id}.xml_phonebook = linekey.{$row.device_key_id}.label = {$row.device_key_label} -{/if} + {/foreach} @@ -2963,8 +2964,8 @@ linekey.{$row.device_key_id}.label = {$row.device_key_label} #memorykey.x.xml_phonebook--Specify the desired remote phonebook/local group/BSFT phonebook for the DSS key. This parameter is only appilicable to the feature XML Group/Local Group/Broadsoft Group. #memorykey.x.sub_type = -{foreach $keys as $row} -{if $row.device_key_category == "memory"} +{foreach $keys["memory"] as $row} + #Expansion Memory Key {$row.device_key_id} memorykey.{$row.device_key_id}.type = {$row.device_key_type} memorykey.{$row.device_key_id}.line = {$row.device_key_line} @@ -2974,7 +2975,7 @@ memorykey.{$row.device_key_id}.label = {$row.device_key_label} memorykey.{$row.device_key_id}.xml_phonebook = memorykey.{$row.device_key_id}.sub_type = -{/if} + {/foreach} @@ -2991,16 +2992,16 @@ memorykey.{$row.device_key_id}.sub_type = #The value 0 of the "proramablekey.x.line" stands for Auto, it means the first available line. #But, when the programmable key is configured as Pick Up, the value 0 stands for line 1. -{foreach $keys as $row} +{foreach $keys["programmable"] as $row} + + +programablekey.{$row.device_key_id}.type = {$row.device_key_type} +programablekey.{$row.device_key_id}.line = {$row.device_key_line} +programablekey.{$row.device_key_id}.value = {$row.device_key_value} +programablekey.{$row.device_key_id}.xml_phonebook = +programablekey.{$row.device_key_id}.history_type = +programablekey.{$row.device_key_id}.label = {$row.device_key_label} - {if $row.device_key_category == "programmable"} - programablekey.{$row.device_key_id}.type = {$row.device_key_type} - programablekey.{$row.device_key_id}.line = {$row.device_key_line} - programablekey.{$row.device_key_id}.value = {$row.device_key_value} - programablekey.{$row.device_key_id}.xml_phonebook = - programablekey.{$row.device_key_id}.history_type = - programablekey.{$row.device_key_id}.label = {$row.device_key_label} - {/if} {/foreach} @@ -3031,8 +3032,8 @@ memorykey.{$row.device_key_id}.sub_type = {$rownum = 1} -{foreach $keys as $row} -{if $row.device_key_category == "expansion"} +{foreach $keys["expansion"] as $row} + {if $rownum <= 40} #Expansion module 1 key {$row.device_key_id} expansion_module.1.key.{$row.device_key_id}.type = {$row.device_key_type} @@ -3042,7 +3043,7 @@ expansion_module.1.key.{$row.device_key_id}.extension = {$row.device_key_extensi expansion_module.1.key.{$row.device_key_id}.label = {$row.device_key_label} expansion_module.1.key.{$row.device_key_id}.xml_phonebook = -{/if} + {/foreach} ##########################################################################################