Provisioning Linksys VoIP Phones

The purpose is to deploy central configuration changes to linksys phones in a network through the help of excel files (holding the data) and a tftp server holding separate configs for every ip phone based on mac address of every phone. So we need to create a different config file for every phone named : spa”MACADDRESS”.cfg

Linksys support provisioning (automatic configuration) through their web interface. To see this we go to the http://ipaddressofthephone and then click admin login and advanced. We will see something like the following:

  • Provision Enable : yes
  • Resync On Reset : yes
  • Profile Rule

We are not going to go in much detail and describe any options here just the basics. So we have enabled Provisioning , told him to do this on reset and also resync periodic every 3600 seconds. Also the Profile Rule has the name of the .cfg file our phone will search on tftproot folder. Keep in mind that you can use all 4 Profiles Rules. We for example can use one .cfg for general configuration and a second or third one containing specific extra configuration for one subset of the phones. The default profile Rule searches the file named spa$PSN.cfg on tftproot folder. $PSN is a variable that is replaced with the model of the phone (for example spa922.cfg). So the concept here is to create this file and use it to change this default configuration.

Installation – Configuration of Tftp – DHCP Server


We must install a tftp server and provide the option 66 to the phones by dhcp. On windows dhcp server we simply add option 66 and the value must be the ip address of tftp server. On Linux boxes we must config the dhcpd.conf file

subnet netmask {
   option tftp-server-name "";

So as you can see in the example the only thing we need to add is :

option tftp-server-name “”;


The tftp configuration is much simpler to be precise we don’t even need to configure anything , the only thing is to put a tftproot folder on tftp.conf for example /tftpboot and be sure that everyone has at least read access there.

Putting the Files in place

So now we must create and use our config files. We must go on tftproot folder and create a file spa$PSN.cfg (keep in mind the filename is case sensitive). We are going to use spa922.cfg for our example for configuring linksys spa922 ip phones

[[email protected] asterisk ~]# cd /tftpboot/
[[email protected] asterisk tftpboot]# ls
druid spa922.cfg

lets see the contents of spa922.cfg

<Profile_Rule ua="na"> tftp://$MA.cfg
<Resync_Periodic ua="na"> 5

So the concept here is that we only change the profile rule to use a different configuration file named tftp://ip_address_of_tftp_server/spa$MA.cfg and also we change the resync interval to 5 seconds. For Spa$MA.cfg , where $MA is a variable that is substituted with the mac address of the phone. So for example a phone with a mac address 000e08dc96c2 will check for a file spa000e08dc96c2.cfg on next interval interpret it and then will reboot to reflect the new configuration settings.

Holding the data on excel file

Here we just want to use a simple excel file to use for our configuration files creation. The reason to do this is that an excel file is easier to manage and modify by anyone even for a simple secretary 🙂 .We can use a network scanner to simply get a list with ip addresses and Mac Addresses of the phones. Then we can add extra columns representing Display Name , username, password and general speaking everything that we want to use for creating our config files. This I suppose will be your task for today cause you have to decide what options you need to change.

Sample Excel data :

IpAddress	Mac_Address	 Display Name Username	00:06:5B:8C:1E:2C	Dokimis Dokimidis	314	00:06:5B:8C:1E:2D	Test User	 255

Keep in mind that we must not use any spaces for any data here and we must save the file as .csv in order to parse it correctly

The script parses the excel file and creates spa$MAC_ADDRESS files for each phone we like. We can change the script or add corresponding data to excel and parse it again anytime we need (after creating new variables) to create the fresh .cfg files we want to upload to phones by provisioning.

Click the links below to download the script and the sample data file dokimi.csv .

Usefull Commands

Force provisioning and sync the phone with specified tftp and .cfg file$MA.cfg

Export the running config to spacfg.xml file for reviewing or editing
ip address of the phone:
ip address of tftp server:
file used for provisioning: spa$MA.cfg

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.