Hi,
I had to do some rejigging of the Cisco SPA templates to get the disable and blf function working the way I wanted it to.
Here are my edits to line 185 to 94 of the SPA504g template, I've highlighted the changes:
{foreach $keys["line"] as $row}
{if $row.device_key_category == "line"}
<!-- Phone/Line_Key_{$row.device_key_id} -->
<Extension_{$row.device_key_id}_ group="Phone/Line_Key_{$row.device_key_id}">{if {$row.device_key_type} == "disabled" or {$row.device_key_type} == "blf"}Disabled{else}{$row.device_key_line}{/if}</Extension_{$row.device_key_id}_>
<!-- This line detects if either "disabled" or "blf" is in the key type field and sets disabled in the extension field of the phone -->
<Short_Name_{$row.device_key_id}_ group="Phone/Line_Key_{$row.device_key_id}">{$row.device_key_label}</Short_Name_{$row.device_key_id}_>
<Share_Call_Appearance_{$row.device_key_id}_ group="Phone/Line_Key_{$row.device_key_id}">{if $row.device_key_type == "shared"}shared{else}private{/if}</Share_Call_Appearance_{$row.device_key_id}_>
<Extended_Function_{$row.device_key_id}_ group="Phone/Line_Key_{$row.device_key_id}">{if {$row.device_key_type} == "blf"}fnc=blf+sd+cp;sub={$row.device_key_value}@{$domain_name};ext={$row.device_key_value}@{$domain_name}{else}{$row.device_key_value}{/if}</Extended_Function_{$row.device_key_id}_>
<!-- This line detects if blf was entered as they key type and populates the extended functions field on the phone with the right values for a BLF based the value entered in the line value field of the device. Note its uses the $doamin_name vairable -->
{/if}
{/foreach}
The line key has to be disabled for extended functions like blf to work. I also like to be able to disable line keys that are not in use, these functions didn't seem to be working, thus the hacks
Bellow is an image of a phone device (SPA504) setup with two extensions, keys 1 and 2 are assigned to the extensions, key 3 is disabled, and key 4 is a BLF monitoring extension 101
This is the resulting phone tab on the phone:
This has been tested on the SPA504G
I had to do some rejigging of the Cisco SPA templates to get the disable and blf function working the way I wanted it to.
Here are my edits to line 185 to 94 of the SPA504g template, I've highlighted the changes:
{foreach $keys["line"] as $row}
{if $row.device_key_category == "line"}
<!-- Phone/Line_Key_{$row.device_key_id} -->
<Extension_{$row.device_key_id}_ group="Phone/Line_Key_{$row.device_key_id}">{if {$row.device_key_type} == "disabled" or {$row.device_key_type} == "blf"}Disabled{else}{$row.device_key_line}{/if}</Extension_{$row.device_key_id}_>
<!-- This line detects if either "disabled" or "blf" is in the key type field and sets disabled in the extension field of the phone -->
<Short_Name_{$row.device_key_id}_ group="Phone/Line_Key_{$row.device_key_id}">{$row.device_key_label}</Short_Name_{$row.device_key_id}_>
<Share_Call_Appearance_{$row.device_key_id}_ group="Phone/Line_Key_{$row.device_key_id}">{if $row.device_key_type == "shared"}shared{else}private{/if}</Share_Call_Appearance_{$row.device_key_id}_>
<Extended_Function_{$row.device_key_id}_ group="Phone/Line_Key_{$row.device_key_id}">{if {$row.device_key_type} == "blf"}fnc=blf+sd+cp;sub={$row.device_key_value}@{$domain_name};ext={$row.device_key_value}@{$domain_name}{else}{$row.device_key_value}{/if}</Extended_Function_{$row.device_key_id}_>
<!-- This line detects if blf was entered as they key type and populates the extended functions field on the phone with the right values for a BLF based the value entered in the line value field of the device. Note its uses the $doamin_name vairable -->
{/if}
{/foreach}
The line key has to be disabled for extended functions like blf to work. I also like to be able to disable line keys that are not in use, these functions didn't seem to be working, thus the hacks
Bellow is an image of a phone device (SPA504) setup with two extensions, keys 1 and 2 are assigned to the extensions, key 3 is disabled, and key 4 is a BLF monitoring extension 101
This is the resulting phone tab on the phone:
This has been tested on the SPA504G
Last edited: