In order to save time and effort put into configuring the Polycom phones as well as further customizing their functionalities, Polycom phones come with the option of downloading and using the configuration files hosted on an (T)FTP server. To make this happen, it is necessary to use a DHCP server that can tell the phone to boot using our FTP server. The following details how we set this up using Asterisk 1.2.x on Centos 4, and one other computer running both the DHCP server and the FTP server. Of course, you can also host the servers on separate machines.
On the main computer that is going to run both the DHCP and FTP server, I installed another ethernet card to configure the phones on a different subnet since I did not want to interfere with any of our main networks. The following shows my network topology:

The advantage with this is mostly convenience. I can still work on my computer using our main networks in addition to being able to configure phones on a separate network.
Installing and Configuring the DHCP server
Let us begin with setting up the DHCP server. I have just added another ethernet card into my computer and have designated it as eth1. Now if I run ifconfig -a, I should see the word MULTICAST for the ethernet cards installed. If not, the kernel must be recompiled with it.
If you can use yum, simply do yum install dhcp to install the dhcp server.
This should also create some default configuration files in /etc that we will have to edit.
Configuring the server mostly takes place in /etc/dhcpd.conf. This is what we used in ours:
option boot-server code 66 = string; # this tells DHCP to set option 66 as a string variable (which will be defined later)
# There are two DHCP update schemes. We wil pick the more reliable one of them
#ddns-update-style ad-hoc;
ddns-update-style interim;
# define the subnet (customize this for your network)
subnet 192.168.2.0 netmask 255.255.255.0 {
# default gateway
option routers 192.168.2.1;
option subnet-mask 255.255.255.0;
option domain-name "asterisk.local";
option domain-name-servers 192.168.2.1; # Since we do not use a DNS server, we'll just point it to the gateway
option time-offset -18000; # Eastern Standard Time
option ntp-servers clock.redhat.com; # NTP server
# We define the range of ips to use here
range dynamic-bootp 192.168.2.3 192.168.2.50;
default-lease-time 600;
max-lease-time 7200;
#Polycom phones configuration starts here
group {
# Boot server, including protocol (FTP) and username/password
# My FTP server (Asterisk box) is 192.168.200.16 – modify for your FTP server (FTP configuration below)
option boot-server "ftp://polycom:123456@192.168.2.2";
# Now, list the phones by network address, to give them
# defined IP per phone. Note that phones listed here is
# what makes them part of the group that gets the above
# configuration
host x217 { # host name is optional, but makes for easy reference
hardware ethernet 00:04:f2:10:05:b9; # MAC address of phone
fixed-address 192.168.2.5; # IP you want assigned to the phone
}
# Repeat the lines above starting with host for as many phones as you would like to
# have configured.
} # end of Polycom group
} # end of subnet block
Now because my computer uses more than one ethernet card, I have to specify that I want to install the recently installed one in /etc/sysconfig/dhcpd:
# Command line options here
DHCPDARGS=eth1
That is it for installing and configuring the DHCP server. You just need to service dhcpd restart and it should be good to go. You can also change the runlevel of the server by doing chkconfig dhcpd on. If you need to debug, turn on the debugging mode by entering dhcp -d -f. You can also do tail -f /var/log/messages.
Installing and configuring the FTP server
Setting up the FTP requires a unix user account to which we place the configuration files the phone is supposed to download.
Add the account:
useradd polycom
passwd polycom
To make it so that the polycom user cannot log into the system, we modify /etc/passwd. At the end, the line referring to the polycom should change from polycom:x:5001:5001::/home/polycom:/bin/bash to polycom:x:5001:5001::/home/polycom:/sbin/nologin.
To install the FTP server, do yum install vsftpd.i386.
Now we need to configure /etc/vsftpd/vsftpd.conf. Change/add the follow parameters:
chroot_list_enable=YES # this allows you to specify local users to chroot() to their home directory
userlist_enable=YES # this makes it so that only the users in the userlist_file will be allowed to log in with FTP
userlist_deny=NO
Now we need to add the polycom user to a few files. By default, they should be /etc/vsftpd/chroot_list and /etc/vsftpd/user_list. Simply append polycom to them.
Now start the server by doing service vsftpd restart. You can also turn it on by default by doing chkconfig vsftpd on.
Setup the phone using Polycom’s configuration files
Make the home directory read only by doing chmod u-w /home/polycom.
Now create the following directories in /home/polycom: contacts, log, overrides. Change their ownership by doing chown polycom.polycom contacts log overrides.
At this point, we’ll need the SoundPoint IP Software 1.6.7 configuration files, which are obtainable here. Unzip by doing unzip <filename>. Although there are newer versions available, they are reported to have bugs.
At this point, you’ll notice a file named 000000000000.cfg. Rename this file to have the same MAC address as the phone by doing mv 000000000000.cfg 0004f21005b9.cfg. for example. You should use the MAC address of your own phone though, which can be found in the sticker in the back.
Modify this new file to include x217.cfg (you can choose to call it something else preferably representing the phone) and server.cfg in the CONFIG_FILES attribute as follows:
<?xml version=”1.0″ standalone=”yes”?>
<APPLICATION APP_FILE_PATH=”sip.ld” CONFIG_FILES=”x217.cfg, server.cfg, phone1.cfg, sip.cfg” MISC_FILES=”" LOG_FILE_DIRECTORY=”" OVERRIDES_DIRECTORY=”" CONTACTS_DIRECTORY=”"/>
Create x217.cfg:
<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
<reginfo>
reg.1.displayName=”John”
reg.1.address=”217″
reg.1.label=”217″
reg.1.auth.userId=”217″
reg.1.auth.password=”12345″
reg.1.lineKeys=”2″
/>
</reginfo>
Create server.cfg:
<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
<!-- Our local phone system common configuration in this file -->
<localcfg>
<server voIpProt.server.1.address="asterisk-server.com"/>
<SIP>
<outboundProxy voIpProt.SIP.outboundProxy.address="asterisk-server.com"/>
</SIP>
<voice>
<volume voice.volume.persist.handset="1"
voice.volume.persist.headset="1"/>
</voice>
<TCP_IP>
<SNTP tcpIpApp.sntp.daylightSavings.enable="1"/>
</TCP_IP>
<localcfg>
This tells the phone which Asterisk server to use, and also configures it to use daylight savings time.
Common configuration updates
Most of this article is based on www.sureteq.com/asterisk/polycom.htm. They also mention some useful updates for DST rules in North America and for configuring the messages button. The following is directly from their article:
Effective March 11th, 2007, there are new DST rules for much of North America and Canada. Here is how to update your Polycom central server to use these new settings permanently.
Go to your FTP home directory (/home/polycom) and ‘nano -w sip.cfg’.
Find the daylight savings time settings (to search in nano, do CTRL+W, type in what you want to find such as ‘daylight’ and press ENTER). They should be in the <TCP_IP> section and should look like this:
tcpIpApp.sntp.daylightSavings.enable=”1″
tcpIpApp.sntp.daylightSavings.fixedDayEnable=”0″
tcpIpApp.sntp.daylightSavings.start.month=”4″
tcpIpApp.sntp.daylightSavings.start.date=”1″
tcpIpApp.sntp.daylightSavings.start.time=”2″
tcpIpApp.sntp.daylightSavings.start.dayOfWeek=”1″
tcpIpApp.sntp.daylightSavings.start.dayOfWeek.lastInMonth=”0″
tcpIpApp.sntp.daylightSavings.stop.month=”10″
tcpIpApp.sntp.daylightSavings.stop.date=”1″
tcpIpApp.sntp.daylightSavings.stop.time=”2″
tcpIpApp.sntp.daylightSavings.stop.dayOfWeek=”1″
tcpIpApp.sntp.daylightSavings.stop.dayOfWeek.lastInMonth=”1″
These may appear on a single line…if so, just ensure there is a space between each setting.
Change these settings to this (changes are in red):
tcpIpApp.sntp.daylightSavings.enable=”1″
tcpIpApp.sntp.daylightSavings.fixedDayEnable=”0″
tcpIpApp.sntp.daylightSavings.start.month=”3”
tcpIpApp.sntp.daylightSavings.start.date=”8”
tcpIpApp.sntp.daylightSavings.start.time=”2″
tcpIpApp.sntp.daylightSavings.start.dayOfWeek=”1″
tcpIpApp.sntp.daylightSavings.start.dayOfWeek.lastInMonth=”0″
tcpIpApp.sntp.daylightSavings.stop.month=”11”
tcpIpApp.sntp.daylightSavings.stop.date=”1″
tcpIpApp.sntp.daylightSavings.stop.time=”2″
tcpIpApp.sntp.daylightSavings.stop.dayOfWeek=”1″
tcpIpApp.sntp.daylightSavings.stop.dayOfWeek.lastInMonth=”0”
CTRL+X to exit, and answer ‘Y’ when asked to save. Reboot your phones and they will have the new setting.
6.2 - Messages button configuration
Another common update to the default config files is telling the ‘Messages’ button what to do. In order to work with Trixbox, this needs to be changed.
Go to your FTP home directory (/home/polycom) and ‘nano -w phone1.cfg’.
Find the ‘<msg’ section and change the following variables:</font>
msg.bypassInstantMessage=”1″
msg.mwi.1.callBackMode=”contact”
msg.mwi.1.callBack=”*97″
CTRL+X to exit, and answer ‘Y’ when asked to save. Reboot your phones, and they will have the new setting.
- Liens:
-
www.linuxhelp.net/forums/index.php
ldp.hughesjr.com/HOWTO/DHCP/x369.html
www.sureteq.com/asterisk/polycom.htm
www.polycom.com/resource_center/1,,pw-492,00.html
www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/sysadmin-guide/s1-dhcp-configuring-server.html
www.voip-info.org/wiki/view/Asterisk@Home+Handbook+Wiki+Chapter+7




