Aastra XML, unleash the power of Asterisk and Aastra phones (includes video)

So you got a brand spanking new Aastra 5xi phone that you want to connect to your Asterisk PBX. Implementing XML on your phones opens up a whole world of possibilities. I'll show you how to do it.

These have all been tested on my Aastra 57i phone. It should work on the 55i as well. I am not sure what will work on other phones. Some things will and some things won't.

This guide assumes you have already followed my install guide. This should work on trixbox and pbxinaflash as well but I haven't tested it.  Most of the files, reference documentation etc. are located in the Aastra XML development guide v2.2. They seem to have removed the visual voicemail application in this latest guide. Have no fear, I have included the script and instructions here.

I may create my own RPM but for now I will show you how to set it up manually so you can get a better idea what is going on.

cd /var/www/html

Copy over the xml files and untar.
wget http://www.powerpbx.org/aastra_xml_2.2.0.tar.gz
tar zxvf aastra_xml_2.2.0.tar.gz
chmod 770 -R /var/www/html/aastra

chown -vR asterisk.asterisk /var/www/html/aastra

mkdir /var/cache/aastra
chown asterisk.aserisk /var/cache/aastra
chmod 770 /var/cache/aastra

readme.txt shows how to configure the phones which I will elaborate on below.
copy/paste /var/www/html/aastra/include/phpagi/phpagi.example.conf to /etc/asterisk
rename it phpagi.conf. If you already have a phpagi.conf file then combine the contents of both.
edit it and put in your server hostname and manager.conf username/password. Done!

All scripts currently working great here on CentOS 5.1/Asterisk1.4/FPBX 2.4

As per readme.txt file, add the following information to the aastra.cfg or MAC.cfg file.  This is obviously tailored to the 57i as the other phones don't have top softkeys so you will have to alter those entries.

#aastra.cfg or MAC.cfg

# XML services
xml application URI: http://xxx.xxx.xxx.xxx/aastra/menu.php?source=all
xml application post list: xxx.xxx.xxx.xxx
xml application title: XML Applications
# Action URI
action uri registered: http://xxx.xxx.xxx.xxx/aastra/register.php?user=$$SIPUSERNAME$$&dndkey=softkey5&cfkey=softkey4

action uri incoming: http://xxx.xxx.xxx.xxx/aastra/incoming.php?number=$$REMOTENUMBER$$&name=$$INCOMINGNAME$$&user=$$SIPUSERNAME$$

action uri onhook: http://xxx.xxx.xxx.xxx/aastra/onhook.php?number=$$REMOTENUMBER$$&name=$$INCOMINGNAME$$&user=$$SIPUSERNAME$$

# Softkeys
topsoftkey1 type: xml
topsoftkey1 label: Day/Night
topsoftkey1 value: http://xxx.xxx.xxx.xxx/aastra/daynight.php?user=$$SIPUSERNAME$$&key=topsoftkey1&daynight_index=1

topsoftkey2 type: xml
topsoftkey2 label: Park Lot
topsoftkey2 value: http://xxx.xxx.xxx.xxx/aastra/park.php
topsoftkey2 states: idle

topsoftkey4 type: speeddial
topsoftkey4 label: Icom
topsoftkey4 value: *80+
topsoftkey4 line: 1

topsoftkey5 type: speeddial
topsoftkey5 label: Park
topsoftkey5 value: "#70"
topsoftkey5 line: 5

softkey1 type: xml
softkey1 label: Directory
softkey1 value: http://xxx.xxx.xxx.xxx/aastra/directory.php
softkey1 states: idle connected

softkey2 type: xml
softkey2 label: Voice Mail
softkey2 value: http://xxx.xxx.xxx.xxx/aastra/vmail.php?ext=$$SIPUSERNAME$$&user=$$SIPUSERNAME$$
softkey2 states: idle

softkey3 type: xml
softkey3 label: Speed Dial
softkey3 value: http://xxx.xxx.xxx.xxx/aastra/speed.php
softkey3 states: idle connected

softkey4 type: xml
softkey4 label: Call Fwd
softkey4 value: http://xxx.xxx.xxx.xxx/aastra/cfwd.php?user=$$SIPUSERNAME$$&key=softkey4
softkey4 states: idle

softkey5 type: xml
softkey5 label: DND
softkey5 value: http://xxx.xxx.xxx.xxx/aastra/dnd.php?user=$$SIPUSERNAME$$&key=softkey5
softkey5 states: idle

softkey6 type: callers
softkey6 label: Callers

softkey7 type: directory
softkey7 label: Contacts

softkey8 type: services
softkey8 label: Services

softkey9 type: speeddial
softkey9 label: Reminders
softkey9 value: 123
softkey9 line: 1

softkey10 type: xml
softkey10 label: Other Apps

Here is a video demonstration of the above example in action.  Sorry about the quality.