Setting up a VOIP server, part 4 (aastra)

By jbayer - Last updated: Tuesday, March 22, 2011 - Save & Share - 4 Comments

The IP phones we are using are made by Aastra, and are great pieces of equipment.  When booting up they contact (by default) a TFTP server, which is identified by DHCP option 66.

We needed to have our phones portable, and didn’t want to go through the hassle of setting up an external TFTP server for several reasons, among them security.  So I set up an ftp server using VSFTP, and wrote a script which synchronizes the tftp directory with the ftp directory.

The script does the following:

Only run if any file in the tftp directory is newer than the newest file in the ftp directory
Update the aastra.cfg to have the phone use an FTP server instead of a TFTP server
Rsync the tftp directory to the ftp directory
Modify all *.cfg files in the ftp directory:

Change the local IP address with the DNS of the server
Change the HTTP lines which reference port 80 to the configured port
Change the HTTP lines which don’t reference a port at all to use the configured port

Change the permissions on all the files in the ftp directory to read only

You will need to configure the following values at the beginning of the script:

SERVERDNS
HTTPPORT
FTPUSER
FTPPASSWORD

If you are using a non-standard tftp directory or ftp directory, you will need to update those values as well (also at the beginning of the script).

I’ve also attached a copy of the vsftpd.conf file.  You will need to create a user that your phones will use to access the FTP server, and add that user to the /etc/vsftpd/user_list file.  I would suggest using the following command for security to add your user:

useradd -s /sbin/nologin -b /var/ftp aastrauser

and don’t forget to put a password on the account

  vsftpd.conf (1.7 KiB, 1,003 hits)

  syncftp.sh (2.6 KiB, 1,245 hits)

Posted in Administration, Linux Installations, Open Source, VOIP • Tags: Top Of Page
1,475 views

4 Responses to “Setting up a VOIP server, part 4 (aastra)”

Pingback from Setting up a VOIP server, part 4 (aastra) » Linux Notes | DriveTap |
Time March 23, 2011 at 12:04 am

[…] FTP Server – Google Blog Search This entry was posted in FTP Server and tagged CuteFTP, Filezilla, FTP CLient, FTP Server, […]

Comment from Fred
Time June 2, 2011 at 2:21 pm

Why not just create a symbolic link between the two directories?

ln -sf /tftpboot /var/ftp

Comment from jbayer
Time June 3, 2011 at 6:40 pm

For three reasons. First, I don’t like to change the standard layout of an OS

Second, and more important, you might want to have different configurations for phones which get their config by ftp as opposed to tftp. In my case all of our phones are the same, but in the future it may be that some phones will need to be configured differently.

Finally, it protects you just a little more from hackers. If someone manages to hack into the FTP server, they could change or delete files in the FTP directory, but no change will be made in the tftp directory.

Comment from Fred
Time September 23, 2011 at 9:52 pm

I don’t need ftp for anything else on a PBX so it’s either or tftp/ftp but never both so just combining makes more sense to me.

For me just using tftpboot solves a lot of problems. I use aastra xml scripts and they just assume all config files go in tftpboot so it sames a lot of hassle for me.

But to each his own. It works either way.

Write a comment

asd