Specifications

Aastra July 2014 PA-001011-03-04
300
16 Appendix E: XML Self-Configuration
Aastra provides here a possible implementation for the self-configuration, this is just an example
source code not supported by Aastra.
In this implementation targeted for Trixbox CE using FreePBX, the chosen policy is to have all the
extensions pre-configured in the Asterisk database and use
the extension
the voice mail password
for the credentials to authenticate the user and link the MAC address of the phone to an extension.
The script checks the credentials but also uses a log file to trace the extensions that are already
used (startup.cfg).
On top of the XML self-configuration we also provide here a hot desking” capability using the
“logout.php”, the user can logout his extension of his current phone and login somewhere else.
For instance the logout key can be configured as a softkey
softkey1 type: xml
softkey1 label: logout
softkey1 value: http://192.168.0.110/startup/logout.php?extension=$$SIPUSERNAME$$
softkey1 states: idle
Notes:
TFTP server root directory is located at ‘/tftpboot’
Asterisk directory is located at ‘/etc/asterisk
XML script and all the related files are located at the root directory of the HTTP server
(typically /var/www/html) under the directory “startup“.
The “startup” directory must have read/write for the HTTP server user.
aastra.cfg (typically located at /tftpboot)
Note: In this example, the Trixbox CE server is located at 192.168.0.110 and is also the TFTP
server.
# Setup DHCP mode
dhcp: 1
# Setup TFTP server address
tftp server: 192.168.0.110
# Time server
time server disabled: 0
time server1: pool.ntp.org
time server2: 192.168.0.110
# Startup URI
action uri startup: http://192.168.0.110/startup/startup.php
gen-aastra script shell to generate the aastra.cfg file
#!/bin/sh
# To put on /usr/local/sbin
echo ""
echo "--------------------------------------------------------------"