In previous posts I showed how to auto-provision and configure Aastra phones by manually installing XML scripts. Aastra has released RPM packages for Trixbox that combines everything and adds new features as well as mDNS so the phones can find the TFTP server even if you don't have a DHCP server capable of assigning it. The script won't install unless mDNS is installed.
This pretty much ties off most if not all loose ends IMHO so we now have a full featured fully automatic script that has addressed just about everything. I'm pleased to provide everything needed to install this on any CentOS 5 based distribution of Asterisk and/or FreePBX including your own from scratch install which is what I did. So having said that I have only tested this on my own from scratch install of CentOS5-Asterisk1.4-FreePBX2.4 using a 57i and 55i phone. I have also tested this on CentOS5-Asterisk1.6-FreePBX2.4. It should work on just about any distribution out there using the same versions of software. It has templates and configurations for all Aastra phones so you don't even have to worry about that. It will automatically configure the phone with all the features it's capable of. What else could you ask for!
The beauty of this procedure is it's all RPM based so it's much simpler and does just about everything for you. The downside is it does everything for you. You don't have to think so if you want to go in and change things or troubleshoot you'll have more of a learning curve.
NOTE: Before you install this script you should enable all the features you plan to use (such as call parking) on FreePBX otherwise you may not be able to get them working and may (reportedly) have to re-install the script. Also, you must have the extensions entered in FreePBX before you assign them to a phone during the autoprovision procedure.
You should have the latest firmware for your Aastra phone installed. According to the official Aastra documentation, this script has been developed and tested with the following firmware versions:
v1.4.2.3000 for Aastra 9112i/9133i/480i and 480iCT
v2.2.0.166 for Aastra 51i/53i/55i/57i and 57iCT
Before you do this you need to uninstall any previous aastra xml scripts.
rpm -q aastra-xml-scripts
If you have previous scripts installed it should come up with something like "aastra-xml-scripts-1.1.0-1". Remove this by typing
rpm -e --noscripts aastra-xml-scripts-1.1.0-1
Note: make sure your /tftpboot directory is r/w/x by user:asterisk group:asterisk otherwise this won't work
chmod -R a+rwx /tftpboot
chown -R asterisk.asterisk /tftpboot
Download and install all the required packages into your /usr/src or other directory. As time goes on you might want to check if these are the latest versions.
yum install php-gd
cd /usr/src
wget http://yum.trixbox.org/centos/5/RPMS/aastra-ipphone-2.3.0-1.noarch.rpm
rpm -ivh aastra-ipphone-2.3.0-1.noarch.rpm
wget http://yum.trixbox.org/centos/5/RPMS/mDNSResponder-108.5-1.i386.rpm
rpm -ivh mDNSResponder-108.5-1.i386.rpm
wget http://yum.trixbox.org/centos/5/RPMS/mDNSResponder-util-108.5-1.i386.rpm
rpm -ivh mDNSResponder-util-108.5-1.i386.rpm
wget ftp://ftp.pbone.net/mirror/www.haoli.org/pub/redhat-6.x/RPMS/i386/mpg123-0.59r-1.i386.rpm
rpm -ivh mpg123-0.59r-1.i386.rpm
wget http://yum.trixbox.org/centos/5/RPMS/aastra-xml-scripts-2.0.0-2.noarch.rpm
rpm -ivh aastra-xml-scripts-2.0.0-2.noarch.rpm
NOTE: If you get a conflict error try this:
rpm -ivh --force aastra-xml-scripts-2.0.0-2.noarch.rpm
redo permissions to make sure the newly copied files are r/w/x by user:asterisk group:asterisk
chmod -R a+rwx /tftpboot
chown -R asterisk.asterisk /tftpboot
setup-aastra-xml
This command creates a proper aastra.cfg in the TFTP directory (/tftpboot) to allow self-configuration. If you need to change how the phones are configured that is all done in the template file /var/www/html/aastra/asterisk/trixbox.prf
I removed all previous files from my /tftpboot directory and deleted my /var/cache/aastra and /var/www/html/aastra directories before I performed this procedure but I'm not sure if that is necessary as long as permissions are correct.
That's it! Now remove the local phone config from the phone or from the phone web gui and reboot. The phone will ask for the ext and password assignment (which must be setup on the FreePBX/Asterisk side first) and reboot again at which point it will come up with the default configuration with all the bells and whistles. Obviously if you don't want some of those features to be configured you can go into the template file and change it.
Here is the official Aastra XML script 2.0.0 manual.
NOTE: If you get a "page load error" on the phone after you reboot it you may need to disable SSL on the server. I did it by issuing a "yum remove mod_ssl" command. This may have some other dependencies in which case it should be disabled in httpd.conf. I haven't figured out how to do that just yet.
Problem....
Followed the steps outlined above but am having a problem with my phone (Aastra 57i) while booting up. Everything goes OK until I get to the select Timezone step. When I select a timezone I get a Loading Page... message and then "Data Timeout". Can't get past this point. In my /var/log/httpd/error_log file I get the following error:
PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/aastra/include/asterisk/phpagi-asmanager.php on line 150.
Can anyone help with this problem? This is my first IP phone and I am just getting started.
Thanks,
Tim
Do you have the server set
Do you have the server set up as UTC. I don't have a CentOS system handy right now but try "nano /etc/sysconfig/clock" and make sure UTC=true.
Admin
Problems
Hi,
I have found that if you reset the phones to Factory defaults and delete the local configs, then you can not use the auto provisioning on that extension any more.
Do you know how to get around that?
Also, there seems to be a little issue with the scripts when something gets changed on the PIAF settings. Recent (080808 fixes) caused the day night to stop working. Any idea's.
Thanks
If you want to re-provision a
If you want to re-provision a phone you have to manually go in and delete the phones MAC address from a *.conf file located in the Aastra (?) directory. The script uses that to keep track of what phones have already been provisioned.
Admin
Cant add extension
I did this setup, everything seems to go off with out a hitch. However now I am trying to add an extension and it keeps saying that my authentication failed. Any ideas?
Wrong password
Apparently the password that its asking for is the voicemail password and not the extension password or secret.... Just FYI
-John
What keeps saying? The phone
What keeps saying? The phone or Asterisk or FreePBX or ?
Admin
Help with Elastix
Hi Admin,
for trixbox your guide works fine, but i need help with elastix as im testing out couple of distributions can you help me get the aastra xml script right now Elastix? i would be a great help to newbies like me.
Ok I just installed it. For
Ok I just installed it. For Elastix I used the PBX in a Flash Aastra XML package. Perhaps the Trixbox one works but I wanted to try something different for giggles. A couple things came up. First, even though the script says it successfuly installs the aastra-xml-scripts it doesn't. You need to manually download that script as per my guide and do a force install (rpm -ivh --force aastra-xml-scripts-2.2.1.noarch.rpm). There is some conflict with some freepbx files that it needs to overwrite.
Then you run "setup-aastra-xml" as per my guide and answer the questions. After you do this you reboot your phone (after erasing local config and setting to factory defaults). You will see a "setup" softbutton on the phone. When you press it you will get a "page load error" message. To get around this I had to disable SSL on the Elastix server. The easiest way is to uninstall it by using the command "yum remove mod_ssl". That seems to have some Elastix/Freepbx dependencies so it may break something else. The alternative would be to figure out how to disable it in /etc/httpd/conf/httpd.conf. I searched around a bit how to do it that way but didn't spend much time on it.
I think the reason this SSL problem comes up is because the newer Aaastra firmware supports it so it probably tries to access https first before http and get's hung up when it see's https response from the server. That is my guess anyways. Apparently you can install security certificates on the phone and use SSL but everyone who has posted about it seems to think it is too much of a pain to bother.
Admin
as per my comment in the
as per my comment in the forum, it should work on any semi-generic distribution. Now that Trixbox has sort of gone off on a tangent away from everyone else, it has a better chance of working on Elastix than Trixbox.
Give me a few days and I will look into this a bit. I will probably try go through a whole install with Elastix and see what comes up.
Admin