Cisco SPA Template Mods & Notes

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

fusion_cisco_blf.jpg

This is the resulting phone tab on the phone:

fusion_cisco_phone.jpg

This has been tested on the SPA504G
 
Last edited:
OK Not sure why i keep working on the Cisco/Linksys SPA templates when the phones are EOL. I guess its because these where my go to phones for a long time.

Anyway, there's a bit of code in the Cisco templates that should be in the Linksys templates if you want the provisioning button to work and you're using http auth for provisioning.

In the Linksys template you need to insert this at line 135

{if isset ($http_auth_username)}
<Profile_Rule group="Provisioning/Configuration_Profile">[--uid {$http_auth_username} --pwd {$http_auth_password}]http://{$domain_name}{$project_path}/app/provision/?mac=$MA</Profile_Rule>
{else}
<Profile_Rule group="Provisioning/Configuration_Profile">http://{$domain_name}{$project_path}/app/provision/?mac=$MA</Profile_Rule>
{/if}