Hello computerbusiness,
I actually found a flaw with the Cisco SPA 508G and 509G config files. If you go to /var/www/html/admin/modules/_ep_phone_modules/endpoint/cisco/spa5xx you can see all the configs as the provisioner system has given you. If you open up family_data.xml, you’ll see under the section:
<model>SPA508G</model>
<lines>8</lines> (this might not be what yours says, I had to fix a few things)
<id>4</id>
<template_data>
that there are two files listed - template_data.xml, and keys.xml. This gives you the speed dial page and web admin page for the template of that phone in FreePBX, but nothing is supplied to say how many line lights there are on the 508 phones. I had to create a file called 8_lines.xml to say to loop start from 1 to 8 (for each button), and then name it as 8_lines.xml and place in this section, similar to how template_data.xml is. I also added a_unit1.xml and a_unit2.xml in the files section, since the 508g phones do support sidecars.
Here is my fixed template_data.xml file for the SPA5xx phones. Remember, you have to make the 8_lines.xml and 12_lines.xml files to say to loop start from 1 to 8, instead of 4 or 5 like the 504 525 phones use, respectively.
<data>
<name>Linksys/Cisco/Sipura SPA Phone Models 5xx, 3xx [303,501G,502G,504G,525G,525G2]</name>
<id>3</id>
<directory>spa5xx</directory>
<firmware_ver></firmware_ver>
<firmware_pkg>NULL</firmware_pkg>
<firmware_md5sum></firmware_md5sum>
<configuration_files>$model.cfg,spa$mac.xml</configuration_files>
<changelog></changelog>
<description></description>
<version>0.6</version>
<model_list>
<model>SPA501G</model>
<lines>8</lines>
<id>1</id>
<template_data>
<files>8_lines.xml</files>
<files>template_data.xml</files>
<files>keys.xml</files>
</template_data>
</model_list>
<model_list>
<model>SPA502G</model>
<lines>1</lines>
<id>2</id>
<template_data>
<files>template_data.xml</files>
<files>keys.xml</files>
<files>a_unit1.xml</files>
<files>a_unit2.xml</files>
</template_data>
</model_list>
<model_list>
<model>SPA504G</model>
<lines>4</lines>
<id>3</id>
<template_data>
<files>4_lines.xml</files>
<files>template_data.xml</files>
<files>keys.xml</files>
<files>a_unit1.xml</files>
<files>a_unit2.xml</files>
</template_data>
</model_list>
<model_list>
<model>SPA508G</model>
<lines>8</lines>
<id>4</id>
<template_data>
<files>8_lines.xml</files>
<files>template_data.xml</files>
<files>keys.xml</files>
<files>a_unit1.xml</files>
<files>a_unit2.xml</files>
</template_data>
</model_list>
<model_list>
<model>SPA509G</model>
<lines>12</lines>
<id>5</id>
<template_data>
<files>12_lines.xml</files>
<files>template_data.xml</files>
<files>keys.xml</files>
<files>a_unit1.xml</files>
<files>a_unit2.xml</files>
</template_data>
</model_list>
<model_list>
<model>SPA525G</model>
<lines>5</lines>
<id>6</id>
<template_data>
<files>5_lines.xml</files>
<files>template_data.xml</files>
<files>keys.xml</files>
<files>a_unit1.xml</files>
<files>a_unit2.xml</files>
</template_data>
</model_list>
<model_list>
<model>SPA525G2</model>
<lines>5</lines>
<id>7</id>
<template_data>
<files>5_lines.xml</files>
<files>template_data.xml</files>
<files>keys.xml</files>
</template_data>
</model_list>
<model_list>
<model>SPA303</model>
<lines>3</lines>
<id>8</id>
<template_data>
<files>3_lines.xml</files>
<files>template_data.xml</files>
<files>keys.xml</files>
</template_data>
</model_list>
</data>
And here is my 8_lines.xml file, for your reference. You also need to make a 12_lines.xml file - just change line 10 to the number of line keys the phone supports:
<template_data>
<category>
<name>Line Options</name>
<subcategory>
<name>Line Options</name>
<item>
<description>Line Keys</description>
<type>loop</type>
<loop_start>1</loop_start>
<loop_end>8</loop_end>
<data>
<item>
<variable>$lineops_keytype</variable>
<default_value>line</default_value>
<description>Line Key {$count} Type</description>
<type>list</type>
<data>
<text>Line</text>
<value>line</value>
<disabled>["$lineops_displaynameline","$lineops_blfext"]</disabled>
</data>
<data>
<text>BLF</text>
<value>blf</value>
<enabled>["$lineops_displaynameline","$lineops_blfext"]</enabled>
</data>
<data>
<text>Speed Dial</text>
<value>sd</value>
<enabled>["$lineops_displaynameline","$lineops_blfext"]</enabled>
</data>
</item>
<item>
<variable>$lineops_displaynameline</variable>
<default_value>{$displayname.line.{$count}}</default_value>
<description>Line Key {$count} Description</description>
<type>input</type>
</item>
<item>
<variable>$lineops_blfext</variable>
<default_value></default_value>
<description>BLF {$count} Extension</description>
<type>input</type>
</item>
<item>
<type>break</type>
</item>
</data>
</item>
</subcategory>
</category>
</template_data>
Let me know if this helps you, and if anyone knows how to place a fix like this upstream on the provisioning system, it would also be appreciated, I’m sure.
Cheers.