Aastra XML scripts on Asterisk 1.6

Sections: 

Aastra SIP phoneWith the recent introduction of patch 3 for Aastra XML scripts 2.2.1 we now have scripts that work on Asterisk 1.6 as well as 1.4.  The installation procedure has also been greatly simplified.  There are at least two bugs in patch 3 that I am sure Aastra will eventually fix but for now I will provide the information to fix it here.

There is a choice of RPM or source based installation.  The RPM based is primarily designed for Trixbox and Elastix.  The source based for PBX-in-a-Flash.  This procedure will describe the source based installation.  Note that Aastra XML scripts are only compatible with 32bit Linux installations according to Aastra.  I have not tested and do not know if they will work with 64 bit installations.

The RPM version specifically for Elastix disables ssl for Aastra scripts which Elastix otherwise uses for browser access by default.

It is assumed you have already installed Asterisk, Asterisk addons, and FreePBX using a procedure such as the one on this site.  You should also have the following FreePBX modules installed.

  • Call Forward
  • Conferences
  • DND
  • Day Night Mode
  • Paging and Intercom
  • Parking Lot

Install Aastra XML v2.2.1 scripts:

First, make sure you do not have avahi installed which is not compatible with mDNS.
yum remove avahi

Now perform the installation procedure
cd /usr/src
wget http://pbxinaflash.net/source/aastra-xml-2.2.1/install-aastra-xml.x.gz
gunzip install-aastra-xml.x.gz
chmod +x install-aastra-xml.x
./install-aastra-xml.x

A server reboot is now needed.
reboot

Now create the aastra.cfg file in /tftpboot in order to launch the self-configuration process.
setup-aastra-xml

Now you should enable all the FreePBX modules, as described above, to use the features in the XML scripts BEFORE you connect and self configure the Aastra phones.  You also need to add the extensions before you self configure the phones which is where you assign the extension numbers.  Note that the password used is voicemail password, not extension password.  So you need to have voicemail enabled for this configuration step.

Also, you need to decide which mode you will be using.  Either 'extension' or 'deviceanduser'.  The default is 'extension'.  You should consult the Aastra XML documentation for those details.

Install patch 3 for Asterisk 1.6

Modify "/etc/asterisk/manager.conf" only with Asterisk 1.6
Add 'originate' as a read/write to the [admin] entry which is the manager user used by freePBX and the Aastra XML scripts, the file should look like this:
[admin]
secret =amp111
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read=system,call,log,verbose,command,agent,user,originate
write=system,call,log,verbose,command,agent,user,originate


Modify /etc/asterisk/voicemail.conf
As the visual voicemail is modifying the voicemail content outside of the voicemail TUI, you need to have "pollmailboxes=yes" in the [general] section.  The file should look something like this:

[general]
#include vm_general.inc
#include vm_email.inc
pollmailboxes=yes

[default]
600 => 600,aastra600,,,attach=no|saycid=no|envelope=no|delete=no
601 => 601,xlite601,,,attach=no|saycid=no|envelope=no|delete=no


Install the patch 3
Patch 1 and Patch 2 are included in Patch 3 so Patch 3 can be installed whatever the status of the installed scripts is.

On the console as root:
cd /usr/src
wget http://65.205.71.13/2.2.1/aastra-xml-scripts-2.2.1-patch-3.run
chmod +x aastra-xml-scripts-2.2.1-patch-3.run
./aastra-xml-scripts-2.2.1-patch-3.run


You need to reboot the server in order to restart the daemons.
NOTE: the daemons are started via lines added to /etc/rc.d/rc.local
reboot


Fix to patch 3 for Asterisk 1.6

This does not apply to Trixbox CE v2.8.0.2, 2.8.0.3 and versions of Asterisk before approximately 1.6.0.11.  This only applies to changes added in patch 3.  This fixes 2 problems.  The first fix corrects a problem with CallerID not showing up in the visual parking lot.  The second fix corrects a problem with the Parking lot splash screen not showing up when a call is first parked.

/var/www/html/aastra/include/AastraAsterisk.php
function Aastra_get_parked_calls_Asterisk()
Change
"$parameter=2;"
to
"$parameter=1"

function Aastra_check_park_Asterisk($user,$number)
Change
"$param_channel=2;"
"$param_timeout=7;"

to
"$param_channel=1;"
"$param_timeout=6;"

Perhaps it was a bug in the version of Asterisk 1.6 that Trixbox currently uses and Aastra tested on which has since been fixed?!

Parked calls show the “name” part of the CID and not the “number” part which I think is by design.  Probably would not be too difficult to modify the code a bit to get it to show the “number” part as well.