Menu Color:
Banner Color:
Main Color:
Header Image:
  • background1
  • background2
  • background3
  • background4
  • background5
  • background6
  • background7
  • background8
  • background9
en-USes-ES
Search
en-USes-ES
February 22, 2017
You are here : Computer Blog
Blog Archive
View Blog
 
     

Mass deployment of Linksys SPA devices (SPA941, SPA942...) using TFTP and XML configuration files for use with Asterisk PBX.

Jul 14 2008

Mass deployment of Linksys SPA devices (SPA941, SPA942...) using TFTP and XML configuration files for use with Asterisk PBX.

Summary steps.

  1. Setup DHCP with TFTP server.
    Create configuration files on the TFTP server.
    Reload the phones.


Setup DHCP with TFTP server.

This step is optional. The primary methods for getting the devices to find their configuration are:

  • Use DHCP to pass option 66 with a reference to the TFTP server.
  • Manually set the location of the configuration files using the web interface.

If you have control over your DHCP server and the phones will be getting their IP addressing from your DHCP server, then  DHCP is your best option. If not, configure the provisioning Profile Rule to point to the configuration file.

If using a Cisco IOS router for DHCP, use the ascii version for Option 66. The Linksys devices do not seem to recognize the IP version of Option 66

 ip dhcp pool [Pool name]
 option 66 ascii [IP address for TFTP server]


Create configuration files on the TFTP server.

We suggest using two configuration files. One holds your global settings. It is the primary configuration used by all devices of that type. The second configuration file is MAC specific. It supplies only a few phone specific settings.

We have seen many suggested configurations that replace the Profile Rule with a new rule using the MAC address. The problem with this is you loose your connection to the original settings file. The newer versions of the software have 4 slots for Profile Rules. The settings are applied in order. If there are any settings duplicated in the profile, the settings from the last applied will override any applied earlier. See the sample configurations below for details

Create one master configuration file for each phone model. The file name should be in the format spa[model number].cfg. For example for the SPA942 phone the default filename would be spa942.cfg. Linux is case sensitive. Make sure your file names are proper case and the permissions are correct.

Create one configuration file for each phone.  The file name should be in the format spa[mac address].cfg. For example for a  phone with a MAC address of 0001eb23de45 the default filename would be spa0001eb23de45.cfg.

Reload the phones. You can do this several ways but these URLs may help make the job easier. If you do not have a DHCP server with option 66, use the resync URL and pass the parameter for your master config file


Useful URLS

Get the current configuration as XML - http://spa-ip-addr/admin/spacfg.xml

Resync URL - http://spa-ip-addr/admin/resync?[[server-name[:port]]/profile-pathname]

The Resync URL lets you force the 900 Series phone to do a resync to a profile specified in the URL, which can identify either a TFTP, HTTP, or HTTPS server. Note: The SPA resyncs only when it is idle.

If no parameter follows /resync?, the Profile Rule setting from the Provisioning page is used.
If no protocol is specified, TFTP is assumed. If no server-name is specified, the host that requests the URL is used as  server-name. If no port is specified, the default port is used (69 for TFTP, 80 for HTTP, and 443 for HTTPS).

The profile-path is the path to the new profile with which to resync, for example:
http://192.168.2.217/admin/resync?tftp://192.168.2.251/spaconf.cfg


Reboot URL - http://spa-ip-addr/admin/reboot

The Reboot URL lets you reboot the SPA900 Series phone. The SPA900 Series phone reboots only when it is idle.

Upgrade URL - http://spa-ip-addr/admin/upgrade?[server-name[:port]][/firmware-pathname]

Notes about the XML configuration file

User Access - The user-access refers to the accessibility of that specific parameter to user-level login on the SPA web interface. Admin-level access to the SPA is unaffected by this attribute.

ua="na" - No Access
ua="ro" - Read Only
ua="rw" - Read Write

Note that the SPA processes differently empty elements versus elements with empty values. If an element tag is specified within an empty element form, than the current value of the corresponding parameter is left unchanged. On the other hand, if the element tag is used within an opening and a closing element, with no value between them, then the corresponding parameter will be set to an empty string.

 

Sample configuration files


Substitute any IP address with the correct IP addresses for your configuration.
============================================================================
spa942.cfg

<flat-profile>
  <!-- Resync_Periodic - Suggest using a low value during testing and raising it later to reduce bandwidth -->
  <Resync_Periodic ua="na">60</Resync_Periodic>

  <!-- Profile_Rule - If using DHCP to pass option 66, /spa$PSN.cfg -->
  <Profile_Rule ua="ro">tftp://192.168.6.238</Profile_Rule>
  <Profile_Rule_B ua="ro">tftp://192.168.6.238/spa$MA.cfg</Profile_Rule_B>

 <!-- Proxy and Registration -->
  <Proxy_1_ ua="ro">192.168.6.238</Proxy_1_>
  <Primary_NTP_Server ua="ro">192.168.6.238</Primary_NTP_Server>
  <Secondary_NTP_Server ua="ro">192.168.6.230</Secondary_NTP_Server>
  <Upgrade_Enable ua="ro">Yes</Upgrade_Enable>
  <Upgrade_Rule ua="ro">tftp://192.168.6.238/spa942-5-2-8.bin</Upgrade_Rule>

 <!-- User Proxy and Registration -->
  <Proxy_1_ ua="ro">192.168.6.238</Proxy_1_>
  <Use_Outbound_Proxy_1_ ua="na">No</Use_Outbound_Proxy_1_>
  <Register_Expires_1_ ua="ro">3600</Register_Expires_1_>
  <Ans_Call_Without_Reg_1_ ua="na">No</Ans_Call_Without_Reg_1_>
  <Use_DNS_SRV_1_ ua="rw">No</Use_DNS_SRV_1_>
  <Proxy_Fallback_Intvl_1_ ua="ro">3600</Proxy_Fallback_Intvl_1_>
  <Proxy_Redundancy_Method_1_ ua="ro">Normal</Proxy_Redundancy_Method_1_>
  <Voice_Mail_Number  ua="na">*97</Voice_Mail_Number>
  <Display_Name_1_ ua="na">$USER</Display_Name_1_>
  <Dial_Plan_1_ ua="na">(*xx.|7xxxS0|9[3469]11S0|9[2-9]xxxxxxS0|91xxx[2-9]xxxxxxS0|xxxxxxxxxxxx.)</Dial_Plan_1_>
  <Time_Zone  ua="na">GMT-05:00</Time_Zone>

 <!-- Logo -->
  <Text_Logo ua="ro">[your company name]</Text_Logo>
  <BMP_Picture_Download_URL ua="ro" />
  <Select_Logo ua="na">Text Logo</Select_Logo>
  <Select_Background_Picture ua="ro">Text Logo</Select_Background_Picture>

 <!-- Admin -->
  <Enable_Web_Server ua="na">Yes</Enable_Web_Server>
  <Web_Server_Port ua="na">80</Web_Server_Port>
  <Enable_Web_Admin_Access ua="na">Yes</Enable_Web_Admin_Access>
  <Admin_Passwd ua="na">[Enter an admin password for the device]</Admin_Passwd>
  <User_Password ua="na"> </User_Password>

 <!-- options: -->

  <Daylight_Saving_Time_Rule ua="na">start=3/8/7/02:0:0;end=11/1/7/02:0:0;save=1</Daylight_Saving_Time_Rule>
  <Call_Return_Code ua="na"> </Call_Return_Code>
  <Blind_Transfer_Code > </Blind_Transfer_Code>
  <Call_Back_Act_Code> </Call_Back_Act_Code>
  <Call_Back_Deact_Code> </Call_Back_Deact_Code>
  <Cfwd_All_Act_Code> </Cfwd_All_Act_Code>
  <Cfwd_All_Deact_Code> </Cfwd_All_Deact_Code>
  <Cfwd_Busy_Act_Code> </Cfwd_Busy_Act_Code>
  <Cfwd_Busy_Deact_Code> </Cfwd_Busy_Deact_Code>
  <Cfwd_No_Ans_Act_Code> </Cfwd_No_Ans_Act_Code>
  <Cfwd_No_Ans_Deact_Code> </Cfwd_No_Ans_Deact_Code>
  <CW_Act_Code> </CW_Act_Code>
  <CW_Deact_Code> </CW_Deact_Code>
  <CW_Per_Call_Act_Code> </CW_Per_Call_Act_Code>
  <CW_Per_Call_Deact_Code> </CW_Per_Call_Deact_Code>
  <Block_CID_Act_Code> </Block_CID_Act_Code>
  <Block_CID_Deact_Code> </Block_CID_Deact_Code>
  <Block_CID_Per_Call_Act_Code> </Block_CID_Per_Call_Act_Code>
  <Block_CID_Per_Call_Deact_Code> </Block_CID_Per_Call_Deact_Code>
  <Block_ANC_Act_Code> </Block_ANC_Act_Code>
  <Block_ANC_Deact_Code> </Block_ANC_Deact_Code>
  <DND_Act_Code> </DND_Act_Code>
  <DND_Deact_Code> </DND_Deact_Code>
  <Secure_All_Call_Act_Code> </Secure_All_Call_Act_Code>
  <Secure_No_Call_Act_Code> </Secure_No_Call_Act_Code>
  <Secure_One_Call_Act_Code> </Secure_One_Call_Act_Code>
  <Secure_One_Call_Deact_Code> </Secure_One_Call_Deact_Code>
  <Paging_Code> </Paging_Code>
  <Call_Park_Code> </Call_Park_Code>
  <Call_Pickup_Code> </Call_Pickup_Code>
  <Call_UnPark_Code> </Call_UnPark_Code>
  <Group_Call_Pickup_Code> </Group_Call_Pickup_Code>
  <Media_Loopback_Code> </Media_Loopback_Code>
  <Referral_Services_Codes> </Referral_Services_Codes>

</flat-profile>

============================================================================
MAC.cfg

<flat-profile>
 <HostName >[Enter the host name for the device]</HostName>
  <Line_Enable_1_ >Yes</Line_Enable_1_>
  <User_ID_1_ >[user id typically the phone extension</User_ID_1_>
  <Password_1_ >[The SIP secret to authenticate]</Password_1_>
  <Use_Auth_ID_1_ >No</Use_Auth_ID_1_>
</flat-profile>