Aastra Park XML Script

I have a trixbox installation that utilizes an XML Park script from Aastra. I am now building a straight FreePBX server without TrixBox and I am having difficulties getting the same functionality out of this Park script. I would also like to try and make the Voice mail, call forwarding and do not disturb scripts work also. For now though I would settle for park. I have copied all of the scripts to var/www/html/aastra/ the park script is in an asterisk folder under the aastra folder. I beleive I have all the permissions set correctly. I am calling the script with the following code mapped to a button on the aastra.


When I press the park button all I see on the phone is loading page. I’m sure I am missing something simple. Does anyone know how to get this working on a non TrixBox installation?

I tried a number of times but had not success. However I was under the gun to get a system back up and running so I didn’t spend enough time on it. There is some info on www.pbxinaflash.com that is suppose to work. I got it installed and got stuck on the phones registering.


I Will take a look at www.pbxinaflash.com and see if I can find something, Thanks.

Make sure your action urls are set correctly and then take a look at your logs
/var/log/httpd/access_log and error_log

This may help to pinpoint what the scripts are trying to access.


I followed this walkthrough located here:


I was able to get some of the XML scripts working but the Park, DND, and Call FWD are all still broken. I will probably try and tackle these some time tomorrow.

I solved my Park / Pickup and other Aastra XML scripts problem. First I followed the walkthrough located here to get the scripts properly installed:


I had to change some of the names for the wget comands as newer versions of files were available since the walkthrough was written.

The above walkthrough mainly focuses on allowing the Aastra to run an auto self configuration script which although might be cool I was more interested in getting the other XML scripts working. I followed all the steps in the walkthrough except for the last one which is “setup-aastra-xml” This last step will overwrite your current aastra.cfg file to prepare for handset auto configuration. since I was not messing with auto config, I did not want to trash my current aastra.cfg file so I left this last step out.

Although this walkthrough got some of the Aastra XML scripts working, it did not allow the DND, Vmail, Park, Call Forwarding, etc. scripts to run. The reason for this is that this walkthrough missed this one last important step.

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. The username is probably “admin”, and the secret is in the [admin] section of /etc/asterisk/manager.conf.

This last step gives the PHP scripts access to asterisk. Without this step all you get is loading page when trying to use scripts such as park.php, cfwd.php, or dnd.php.

I hope this helps others who are trying to accomplish this same functionality with Aastra XML scripts.

The above install method seems to work for all scripts I am using except for some problems with vmail.php. It works until I try and play a Voicemail. When I try and play a voicemail it hangs and never plays the message. Although I am still having this small problem, I’m really happy to have the rest of my Aastra XML scripts working especially park.php. If anyone has an idea how to fix the vmail.php script, I would love to hear it.

Here is an example of the lines in my MAC.cfg file to illustrate how I am using the scripts

Services Applications

xml application URI: http://XML_SERVER/aastra/menu/mymenu.php?menu_source=MyMenu&menu_user=$$SIPUSERNAME$$&user=$$SIPUSERNAME$$
xml application title: “Applications”

Action URI

action uri registered: http://XML_SERVER/aastra/asterisk/sync.php?action=register&user=$$SIPUSERNAME$$&cfkey=softkey4&dndkey=softkey3
action uri poll: http://XML_SERVER/aastra/asterisk/sync.php?action=check&user=$$SIPUSERNAME$$&cfkey=softkey4&dndkey=softkey3
action uri poll interval: 1800
action uri incoming: http://XML_SERVER/aastra/asterisk/incoming.php?number=$$REMOTENUMBER$$&name=$$INCOMINGNAME$$&user=$$SIPUSERNAME$$
action uri onhook: http://XML_SERVER/aastra/asterisk/onhook.php?number=$$REMOTENUMBER$$&name=$$INCOMINGNAME$$&user=$$SIPUSERNAME$$

#Top 6 programmable buttons

#Available services
prgkey1 type: services

#Answer a ringing extension
prgkey6 type: speeddial
prgkey6 value: *8

#Bottom 20 programmable buttons


softkey1 type: directory
softkey1 label: “Directory”

#Check Voice Mail
softkey2 type: xml
softkey2 label: "V-Mail"
softkey2 value: http://XML_SERVER/aastra/asterisk/vmail.php?ext=$$SIPUSERNAME$$

#Set Do Not Disturb
softkey3 type: xml
softkey3 label: "DND"
softkey3 value: http://XML_SERVER/aastra/asterisk/dnd.php?user=$$SIPUSERNAME$$

#Set Forwarding
softkey4 type: xml
softkey4 label: "Call FWD"
softkey4 value: http://XML_SERVER/aastra/asterisk/cfwd.php?user=$$SIPUSERNAME$$
softkey4 states: idle

softkey5 type: park
softkey5 label: "Park"
softkey5 value: asterisk;70
softkey5 states: connected

#Pickup Parked Call
softkey6 type: xml
softkey6 label: "Pickup"
softkey6 value: http://XML_SERVER/aastra/asterisk/park.php

I was messing around with the new speeddialxfer button type for another purpose and I found a quicker way to park a call. Previously when using the above parking method the server would always read out the parking lot extention number to the person parking the call. This was and still is needed for anyone not using the park.php script. After using the park.php visual parking lot this reading out of the parking lot extension number is no longer necessary. I have been wanting a quicker way to transfer a call to the parking lot ever since I started using park.php. I have seen a few other methods of trying to accomplish this but my new solution is easy and works great You can set your park button on a progkey softkey or topsoftkey with slight variations of this setup.

Using the above example replace the softkey5 lines in the aastra.cfg or MAC.cfg file with the following.

softkey5 type: speeddialxfer
softkey5 label: "Park"
softkey5 value: "70"
softkey5 states: connected

After tapping this button the phone will immediately transfer the call into the parking lot and terminate without waiting around for the server to read the parking lot extension number.

I am using the latest Aastra firmware ver on a 55i phone. I have not tested this on any other Aastra phone then the 55i. I suspect it will work on all 55x versions though.

Hum nice use of the buttons but I have one issue with it. You don’t know what parking slot the call went to so how can you tell your boss to pick up the call on xx it’s his kids school calling because somebody got hurt and they need to talk to him?

When you park a call, you get a message with the parking slot.


I am using the visual parking lot XML script written by Aastra called park.php. This XML script virtually eliminates the need to know what extension is used tp park a call. when you use this visual parking lot script you hit the pickup button and you see a list of all calls parked listed by Caller ID. There is no mention of extension number when using this script. You then select a parked call from the list to answer. My clients have asked me on a few occations to eliminate the wait for the server to announce the parking lot location. I have also seen other threads in the past where people were looking for something similar by trying a speed dial of “##70#” to accomplish the same behavior. This new button has now solved this problem for me. If you are not using the visual parking lot XML script then you would definately not want to use button for this purpose as you would then have no idea where a call is parked.

ok my mistake. I’ve never messed with the Aastra phone scripts to know that they could do that on the display.

Related to this, does anyone know of a way to light the Park LED on a 57i when there are any parked calls when using the Park XML script?

I like the idea on lighting the red light when there are parked calls. I have no idea on how to do this but I would like to know if someone has an idea.

Just map the parking lot extensions to keys using ‘blf’ as the type within the aastra.cfg (or individual phones mac.cfg) file. Example:

topsoftkey5 type: blf
topsoftkey5 label: 71
topsoftkey5 value: “71”

Will map to the fifth position button on the top display labeled ‘71’, which is one of my parking lot extensions. You can certainly use it with the bottom set of buttons as well and add as many as you need. It works very well.

tadpole, when you use your speeddial method, does the phone still display the parking lot the call was sent to?

I am not satisfied with the time it takes to park a call because I have users that tend to handup too early and cannot be trained to wait.

I can dump the call over but I need to know what parking lot it goes to. Even using the visual parking lots this is important because you may have 5 or 6 calls in the parking lots and some with unknown caller id.

any feedback would be great.


I think the reason you had to do those manual steps is because you skipped the “setup-aastra-xml” part.

If you look at the manual (part I) setup procedure it explains those manual steps.