Autoprovisioning Aastra phones with video demonstration

来源:互联网 发布:app网址域名怎么查询 编辑:程序博客网 时间:2024/06/06 01:23

Setting up your Asterisk PBX for XML auto provisioning has 2 primary advantages.  It allows non-technical people to install phones and speeds up the process of adding a large number of phones.

XML auto provisioning is installed as follows. This assumes you already have the other XML scripts installed on the server end as discussedpreviously.

Download the following v2.2 files. If there is a newer version xml developer guide download it from theaastra telecom site under user manuals. In the zip file there is a startup.php file which you place in /var/www/html/aastra. There are also Aastra5xi.cfg template files which you place in the same place. You can edit the template files to add whatever features you want. There is also a gen-aastra executable which you can place in /usr/local/sbin. At command prompt you run it and it will generate a basic aastra.cfg file for you automatically. You can edit the aastra.cfg file as you please as long as the startup url line remains because it points to the startup.php provisioning script.

You have to edit startup.php line 16, 17, 18, and 19  to point to the proper location for your config.inc.php and backend.inc.php files which should be 'include/asterisk' and 'include/phpagi" instead if just 'include' and 'phpagi'. Also, your tftpboot directory needs to be executable.

Assuming your dhcp server is configured for giving out the tftp option 66 information the phone will boot, go to the tftp server and read aastra.cfg at which point it runs the startup.php script. If you don't or can't set tftp in your DHCP server enter the tftp IP manually in the phone menu.  Once the phone boots you will see a menu on the phone asking for the ext#/password you want assigned to the phone. Once you enter that the MAC.cfg file is automatically created based on the Aastra5xi.cfg files. It is able to automatically determine the phone model and Mac# so that part is all automated for you. It creates/updates a startup.cfg file to keep track of what extensions are being used so there is no duplication.

That's it. Sounds more complicated than it is and a small price to pay if you have a bunch of phones to install or want it automated so anyone non-technical can install phones.

The core instructions for this procedure are located in Appendix E of the Aastra XML development guide v2.2.x locatedhere. Use my little description above to take care of the little gotcha's you will encounter using their procedure in its current form. The guide only talks about 5xi phones so I don't know if it works with the 480i or 9133i phones.  The current startup.php is somewhat limited which you will figure out when you use it but still quite useful and highly customizable.

Here are the Linux command line instructions for the above procedure.

cd /var/www/html/aastra
wget http://www.powerpbx.org/autoprovisionv2.2.0.tar.gz
tar zxvf autoprovisionv2.2.0.tar.gz
mv /var/www/html/aastra/gen-aastra /usr/local/sbin
chmod 777 -R /tftpboot

nano /var/www/html/aastra/startup.php

Goto line 11 and 12 and edit to point to /var/www.html/aastra/include/asterisk

mv /tftpboot/aastra.cfg /tftpboot/aastra.cfg.orig
gen-aastra
nano /tftpboot/aastra.cfg点击打开链接

edit the url to point to /serverip/aastra/startup.php

Now if all goes well you can reboot your phone at which point it will ask for ext and password which should already be setup in FreePBX extensions.  The script will then automagically create the MAC.cfg file in /tftpboot for the phone config and a startup.cfg file in /var/www/html/aastra to keep track of the autoprovisioned phones.  If you need to redo an autoprovisioned extension for whatever reason you will need to edit this startup.cfg file otherwise you will get an error saying the extension is already in use.

TROUBLESHOOTING
Two VERY handy files for troubleshooting problems are /var/log/httpd/access_log and /var/log/httpd/error_log.  Another one for general Asterisk troubleshooting is /var/log/asterisk/full.  Whenever I can't get something to work such as this procedure, that is the first place I look.

Finally, a short video showing the auto provision boot up sequence.  Sorry if it's a bit fuzzy.  Much easier and faster than doing it manually wouldn't you agree?!
0 0
原创粉丝点击