PDA

View Full Version : Aastra XML scripts



tralala
12-10-09, 11:13 AM
Hello,

Has anyone installed the Aastra XML scripts on their device?

The scripts are available here:

http://www.aastratelecom.com/cps/rde/xchg/03/hs.xsl/27643.htm

with installers for 3 systems (Trixbox, PBXinaFlash, Elastix).

How can I install them on WArpXtra?

Thanks

skar
12-14-09, 05:13 PM
I know that some customers have used these scripts. They have also been used in FreePBX versions in conjunction with the auto-provisioning module described here (http://pikawarp.org/?p=275).

The FreePBX image also has a tftpserver to use with these files. If you are going to use those files, make sure you are using an SD card.

Skar

imported_Mag
01-14-10, 02:43 AM
Keep us posted if you do manage to get the scripts working as I am also very interested in this functionality.

M

pbeaton
01-20-10, 06:09 AM
I've managed to get them installed on the 2.0.13.3 FreePBX image, but apart from the Park script I haven't properly tested them. I based it on the installed version I have on a trixbox (for permissions and file ownership).


What I did was:
Download http://www.aastratelecom.com/cps/rde/xbcr/SID-3D8CCB6A-19D21470/03/Aastra_XML_Source_code_V2.2.1.zip and expanded it.

Opened /etc/asterisk/sip_notify.conf and added

; Aastra check-sync
[aastra-check-cfg]
Event=>check-sync
Content-Length=>0

; Aastra XML event
[aastra-xml]
Event=>aastra-xml
Content-Length=>0

Open /etc/rc.local and add:

/var/www/html/aastra/asterisk/aastra_daemon1&
/var/www/html/aastra/asterisk/aastra_daemon2&

Then working through the INSTALL folder:
agi-bin
Renamed /var/lib/asterisk/agi-bin/user_login_out.agi
Copied the two files in agi-bin to /var/lib/asterisk/agi-bin

chown asterisk:asterisk /var/lib/asterisk/agi-bin/user_login_out.agi
chmod 754 /var/lib/asterisk/agi-bin/user_login_out.agi
chown asterisk:asterisk /var/lib/asterisk/agi-bin/record-vm-greetings.php
chmod 775 /var/lib/asterisk/agi-bin/record-vm-greetings.php

Then copy /var/lib/asterisk/agi-bin/user_login_out.agi to /var/html/admin/modules/core/agi-bin/

asterisk
Copied extensions-away-status.conf to /etc/asterisk/

chown asterisk:asterisk /etc/asterisk/extensions-away-status.conf
chmod 775 /etc/asterisk/extensions-away-status.conf

cache

mkdir /var/cache/aastra
copied the contents of cache to /var/cache/aastra

chown -R asterisk:asterisk /var/cache/aastra
chmod -R 755 /var/cache/aastra

MP3

mkdir /var/cache/MP3
copied contents of MP3 to /var/cache/MP3

chown -R asterisk:asterisk /var/cache/MP3
chmod -R 755 /var/cache/MP3

scripts
Copy setup-aastra-xml to /usr/local/sbin/setup-aastra-xml

chmod 744 setup-aastra-xml

sounds
Just realised I've not done this, so not tested this.
Copy the contents to /var/lib/asterisk/sounds/custom/

chmod asterisk:asterisk *.wav
chmod 775 *.wav

Then from the SCRIPTS folder
mkdir /var/www/html/aastra
Copy everything from the scripts folder to /var/www/html/aastra

chmod -R 755 /var/www/html/aastra
chown -R asterisk:asterisk /var/www/html/aastra

Open /var/www/html/aastra/scripts/setup-xml

I found I had to comment out a lot of the script (mostly language selection) as it makes use of arrays which the ash shell doesn't support and make a couple of changes.

Change line 25 to:

create_config_file () {
Comment out 111
Comment out 117-118
Comment out 124-165
Change line 166 to:

IFACE="eth0"
Change line 167 to:

IPADDR=`$IFCONFIG $IFACE|awk '/inet addr/{print $2**'|awk -F: '{print $2**'`
Comment out 169
Comment out 174-544 Language selection
Comment out 1989-2015
Comment out 2017

It's probably best to change the /tftpboot link to point at /mnt/sd/tftpboot if it doesn't already.
Then reboot the warp.
run setup-aastra-xml to create the initial aastra.cfg

Assuming your DHCP server can set Option 66, set that to the IP of your warp and boot/reboot the phone. If not set the TFP server on the phone after it first starts up and reboot the phone.
You should then be asked to login on the handset (works with the extension number and voicemail password).

skar
02-11-10, 01:02 PM
I have created a package that automates most of what pbeaton describes above. I was also able to maintain the support for multiple languages by rewriting the setup-aastra-xml script file.

Check it out here, http://forum.pikatechnologies.com/showthread.php?t=492 and let us know what you think.

Skar (http://twitter.com/skar_pikawarp)

erwin.zeez
04-21-10, 01:51 AM
I've managed to get them installed on the 2.0.13.3 FreePBX image, but apart from the Park script I haven't properly tested them. I based it on the installed version I have on a trixbox (for permissions and file ownership).


What I did was:
Download http://www.aastratelecom.com/cps/rde/xbcr/SID-3D8CCB6A-19D21470/03/Aastra_XML_Source_code_V2.2.1.zip and expanded it.

Opened /etc/asterisk/sip_notify.conf and added

; Aastra check-sync
[aastra-check-cfg]
Event=>check-sync
Content-Length=>0

; Aastra XML event
[aastra-xml]
Event=>aastra-xml
Content-Length=>0

Open /etc/rc.local and add:

/var/www/html/aastra/asterisk/aastra_daemon1&
/var/www/html/aastra/asterisk/aastra_daemon2&

Then working through the INSTALL folder:
agi-bin
Renamed /var/lib/asterisk/agi-bin/user_login_out.agi
Copied the two files in agi-bin to /var/lib/asterisk/agi-bin

chown asterisk:asterisk /var/lib/asterisk/agi-bin/user_login_out.agi
chmod 754 /var/lib/asterisk/agi-bin/user_login_out.agi
chown asterisk:asterisk /var/lib/asterisk/agi-bin/record-vm-greetings.php
chmod 775 /var/lib/asterisk/agi-bin/record-vm-greetings.php

Then copy /var/lib/asterisk/agi-bin/user_login_out.agi to /var/html/admin/modules/core/agi-bin/

asterisk
Copied extensions-away-status.conf to /etc/asterisk/

chown asterisk:asterisk /etc/asterisk/extensions-away-status.conf
chmod 775 /etc/asterisk/extensions-away-status.conf

cache

mkdir /var/cache/aastra
copied the contents of cache to /var/cache/aastra

chown -R asterisk:asterisk /var/cache/aastra
chmod -R 755 /var/cache/aastra

MP3

mkdir /var/cache/MP3
copied contents of MP3 to /var/cache/MP3

chown -R asterisk:asterisk /var/cache/MP3
chmod -R 755 /var/cache/MP3

scripts
Copy setup-aastra-xml to /usr/local/sbin/setup-aastra-xml

chmod 744 setup-aastra-xml

sounds
Just realised I've not done this, so not tested this.
Copy the contents to /var/lib/asterisk/sounds/custom/

chmod asterisk:asterisk *.wav
chmod 775 *.wav

Then from the SCRIPTS folder
mkdir /var/www/html/aastra
Copy everything from the scripts folder to /var/www/html/aastra

chmod -R 755 /var/www/html/aastra
chown -R asterisk:asterisk /var/www/html/aastra

Open /var/www/html/aastra/scripts/setup-xml

I found I had to comment out a lot of the script (mostly language selection) as it makes use of arrays which the ash shell doesn't support and make a couple of changes.

Change line 25 to:

create_config_file () {
Comment out 111
Comment out 117-118
Comment out 124-165
Change line 166 to:

IFACE="eth0"
Change line 167 to:

IPADDR=`$IFCONFIG $IFACE|awk '/inet addr/{print $2**'|awk -F: '{print $2**'`
Comment out 169
Comment out 174-544 Language selection
Comment out 1989-2015
Comment out 2017

It's probably best to change the /tftpboot link to point at /mnt/sd/tftpboot if it doesn't already.
Then reboot the warp.
run setup-aastra-xml to create the initial aastra.cfg

Assuming your DHCP server can set Option 66, set that to the IP of your warp and boot/reboot the phone. If not set the TFP server on the phone after it first starts up and reboot the phone.
You should then be asked to login on the handset (works with the extension number and voicemail password).

__________________________________
well i was searching web for this question of mine and found the answer here ;
thanks to all of you sharing this one here