|
24.05.07 16:57 Age: 2 yrs
Setting up a DHCP and FTP server to configure Soundpoint IP polycoms Category: opensource-blog, VOIP
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 serverLet 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)
#Polycom phones configuration starts here
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
Installing and configuring the FTP serverSetting 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
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 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
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"?>
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> <?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"
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"
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.
|


