New Aastra XML scripts for Trixbox CE
We have just released and made available on the Trixbox yum server the new version of the XML scripts for tha Aastra SIP phones. A detailed documentation will be posted on our web site next week, in the meantime here are some basic information on how to install and use the new scripts.
We tested the scripts on Trixbox CE 2.6 but they should be compatible with 2.2 and 2.4. Also, the phones need to be running 1.4.2.3000 for the 9112i, 9133i, 480i and 480iCT and 2.2.0.166 for the 5i Series.
What's new
The main additions to the XML scripts are the auto-discovery and self-configuration which allows a plug and play deployment of Aastra SIP phones with a Trixbox CE server. On top of that we have added:
- a MP3 Player application (requested by Kerry)
- the day/night control (thanks Ethan for the idea)
- a graphical Yahtzee game leveraging the new GD class we have provided in the XML API SDK for the 2.2 firmware (55i and 57i/57iCT only)
- a meet-me manager aplication
- the display of the parking orbit when the user hangs up the phone after a parking (requested in the forum)
- new RSS feeds and many more...
Installation
Just do a
yum install aastra-xml-scripts
or
yum update aastra-xml-scripts
There are some dependencies such as mpg123 and mDNSResponder which will be resolved by yum, all the needed packages are on the Trixbox yum repository.
You can also install php-gd if you plan to use the graphical applications.
Once the scripts are install, you have to run the following command from the console
setup-aastra-xml
This command creates a proper aastra.cfg in the TFTP directory (/tftpboot) to allow self-configuration.
Auto-discovery
The auto-discovery is provided by using the Apple Bonhour protocol a.k.a mDNSResponder. When the scripts are installed, the mDNSResponder daemon is also installed and configured to answer to the Aastra SIP phone mDNS request for configuration.
The deamon will answer to the phone providing the IP address of the TFTP server, this allows you to deploy in evnvironment where you cannot (or don't want to) use DHCP option 66 or other flavors of it.
Once the phone gets its configuration server, it will download the right firmware and the aastra.cfg generated earlier triggering the self-configuration, we use the action uri startup to launch a XML script after the boot.
If the phone gets more than one answer (multiple Trixbox servers on the LAN), the user will be prompted with a choice and will have to select which server he wants to connect to.
Self-Configuration
For the self-configuration, we have implemented XML scripts which will create the phone config file after the user has been authenticated.
We identify a user using:
- his extension
- his voicemail password
Which means that each user must have a voicemail enabled with a password.
Once the user is identified, he is prompted for a timezone, then the phone reboots with a complete configuration. This configuration comes from a template file located at /var/www/html/aastra/asterisk/trixbox.prf covering every type of Aastra phones. This file can be changed to accomodate your needs.
As we use park and directed call pickup in the configuration files, make sure that the parking has been properly configured using FreePBX before you connect your phone or some features might not work.
MP3 Player
The MP3Player aplication is delivered with a (free of right) MP3 sample file to be able to work 'out of the box'.
You can configure the location of the MP3 directories in /var/www/html/aastra/config/asterisk.conf
Then to index the MP3 files use
cd /var/www/html/aastra/asterisk
php genMP3.php
The files will be indexed only if they include id3 tags with artist and title.
The application allows you to browse by artists, albums and songs and will play your selection.
Again, a more detailed documentation will be available next week. Feel free to provide any feedback or idea for these scripts as well as report the bugs.
Enjoy
Aastra1 - Stephane
Are there any improvements in the voicemail application? My users would love to use it if it worked properly when not in hands free mode. The existing app is not usable unless you want to use the speaker phone to listen to messages.
Thanks for the major improvements!
-Rick
PERFECT TIMING!
The Aastra Away Status Presence Manager has just been released thanks to the last community contribution!
http://www.trixbox.org/forums/trixbox-forums/open-discussion/boun...
(see my last post)
Have fun, and stay tuned for more exciting stuff coming down the pipe!
http://www.nsd.dk/?Support:Trixbox:Queuetoggle
this would be a nice app to add, although i cant get it to work anymore for some reason, has anyone used this on recent versions?
Queuetoggle works fine here, trixbox 2.2.12 aastra 57i firmware 2.2
Type : XML
http://xx.xx.xx.xx/queuetoggleaastra.php?agent=xx&queue=xx
copy the script to /var/www/html change the xx part above
/Thomas
--
www.nsd.dk
right - i have used it before, but on a new 2.6 system it dont work, just gives soemthing like page error on the phone.
i also wanted to do it like this:
http://xx.xx.xx.xx/queuetoggleaastra.php?agent=$$SIPUSERNAME$$&queue=xx
but neither way seem to work on this new system, are there any specific phpagi settings that requires? thanks Peter.
try this
in a ssh
[root@nsd ~]# asterisk -r -x 'add queue member Local/22@from-internal to 100'
(responce)Added interface 'Local/22@from-internal' to queue '100'
this is basicly what the script does.
22 is the extension and 100 is the queue
How does the webside looks like if you use firefox and look at the source of the webpage?
hmm - slightly same on 2.6.0.7:
Processing Dependency: libesd.so.0 for package: mpg123
--> Finished Dependency Resolution
Error: Missing Dependency: libesd.so.0 is needed by package mpg123
EDIT: dep fixed:
rpm -ihv <a href="ftp://ftp.is.co.za/mirror/centos/5.1/os/i386/CentOS/esound-0.2.36-3.i386.rpm" title="ftp://ftp.is.co.za/mirror/centos/5.1/os/i386/CentOS/esound-0.2.36-3.i386.rpm">ftp://ftp.is.co.za/mirror/centos/5.1/os/i386/CentOS/esound-0.2.36...</a> rpm -e --nodeps mpg123-1.3.1-1.el5.rf yum install mpg1232
EDIT: - I take that back.
All I can say is WOW - this is some excellent PHP design:
the default cfg file is now in: /var/www/html/aastra/asterisk/trixbox.prf
everything is loaded through automated variables instead of static entries, and theres unique button configs for each phone model (needed this for long time).
This is awesome from an installers perspective - hats off to your coders Aastra!
I just set this up at home, and here's a couple of things I've noticed:
First, I can't say for sure if it was these scripts, but somehow the sticky bit got set on the voicemail extension directory and the INBOX for that extension, and group perms were removed. This make it impossible to retrieve messages from anywhere.
I'm pretty sure it's these scripts that caused the sticky bit issue, because I made another extension without hooking up a phone and I was able to leave and retrieve messages all I wanted.
Second, even after I fixed the permissions issue I can't use the voice mail xml button on my 480i I've got at home. I can see the message, but when I select "play" it just says "Loading Page..." for a minute or so, then times out. The only thing in the console when this happens are some login and log out messages for the management port.
I get this in /var/log/httpd/error_log:
[Fri Apr 11 21:15:56 2008] [error] [client 192.168.0.120] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/functions.inc.php on line 83, referer: <a href="http://mediasrv/recordings/index.php" title="http://mediasrv/recordings/index.php">http://mediasrv/recordings/index.php</a> [Fri Apr 11 21:16:17 2008] [error] [client 192.168.0.108] Fri, 11 Apr 2008 21:16:17 -0500 - Got event.. newchannel [Fri Apr 11 21:16:17 2008] [error] [client 192.168.0.108] Fri, 11 Apr 2008 21:16:17 -0500 - No event handler for event 'newchannel' [Fri Apr 11 21:16:17 2008] [error] [client 192.168.0.108] Fri, 11 Apr 2008 21:16:17 -0500 - Got event.. newcallerid [Fri Apr 11 21:16:17 2008] [error] [client 192.168.0.108] Fri, 11 Apr 2008 21:16:17 -0500 - No event handler for event 'newcallerid' [Fri Apr 11 21:16:17 2008] [error] [client 192.168.0.108] Fri, 11 Apr 2008 21:16:17 -0500 - Got event.. extensionstatus [Fri Apr 11 21:16:17 2008] [error] [client 192.168.0.108] Fri, 11 Apr 2008 21:16:17 -0500 - No event handler for event 'extensionstatus' [Fri Apr 11 21:16:17 2008] [error] [client 192.168.0.108] Fri, 11 Apr 2008 21:16:17 -0500 - Got event.. extensionstatus [Fri Apr 11 21:16:17 2008] [error] [client 192.168.0.108] Fri, 11 Apr 2008 21:16:17 -0500 - No event handler for event 'extensionstatus' [Fri Apr 11 21:16:17 2008] [error] [client 192.168.0.108] Fri, 11 Apr 2008 21:16:17 -0500 - Got event.. hangup [Fri Apr 11 21:16:17 2008] [error] [client 192.168.0.108] Fri, 11 Apr 2008 21:16:17 -0500 - No event handler for event 'hangup'
And here's the access log:
192.168.0.108 - - [11/Apr/2008:21:29:10 -0500] "GET /aastra/asterisk/vmail.php?ext=501 HTTP/1.0" 200 322 "-" "Aastra480i Cordless MAC:00-08-5D-18-46-42 V:1.4.2.3000-SIP" 192.168.0.108 - - [11/Apr/2008:21:29:15 -0500] "GET /aastra/asterisk/vmail.php?ext=501&user=501 HTTP/1.0" 200 340 "-" "Aastra480i Cordless MAC:00-08-5D-18-46-42 V:1.4.2.3000-SIP" 192.168.0.108 - - [11/Apr/2008:21:29:20 -0500] "GET /aastra/asterisk/vmail.php?user=501&ext=501&pin=501 HTTP/1.0" 200 922 "-" "Aastra480i Cordless MAC:00-08-5D-18-46-42 V:1.4.2.3000-SIP" 192.168.0.108 - - [11/Apr/2008:21:29:25 -0500] "GET /aastra/asterisk/vmail.php?user=501&pin=501&ext=501&folder=INBOX&action=zoom&msg=0000-INBOX HTTP/1.0" 200 872 "-" "Aastra480i Cordless MAC:00-08-5D-18-46-42 V:1.4.2.3000-SIP" 192.168.0.108 - - [11/Apr/2008:21:29:28 -0500] "GET /aastra/asterisk/vmail.php?user=501&pin=501&ext=501&folder=INBOX&action=play&msg=0000-INBOX HTTP/1.0" 200 113 "-" "Aastra480i Cordless MAC:00-08-5D-18-46-42 V:1.4.2.3000-SIP" 192.168.0.108 - - [11/Apr/2008:21:29:59 -0500] "GET /aastra/asterisk/incoming.php?number=0000&name=VoiceMail&user=501 HTTP/1.0" 200 250 "-" "Aastra480i Cordless MAC:00-08-5D-18-46-42 V:1.4.2.3000-SIP" 192.168.0.108 - - [11/Apr/2008:21:29:59 -0500] "GET /aastra/asterisk//vmail.php?action=display&msg=0000-INBOX&user=501&pin=501&ext=501&folder=INBOX HTTP/1.0" 200 481 "-" "Aastra480i Cordless MAC:00-08-5D-18-46-42 V:1.4.2.3000-SIP"
Any ideas?
I turned on debugging on the phone and sent it to syslogd on my server, the results are here:
If anyone wants to help me parse through it I would be grateful, but I realize it's a mind numbing task.
I made some annotations while it was happening, some of them got lost in the stream, but if you search for "SEARCH FOR THIS" you'll see where I was pressing buttons and whatnot.
Ok, this isn't just at home. I have a demo system I just set up, it was a 2.4 ISO, upgraded to 2.6 via yum, same as at home. I guess I may want to download an actual 2.6 ISO at some point.
Anyway, I set up some test extensions on the demo box, then tried to send a voicemail. The message went through, and it's sitting where it should, but I can't retrieve it because:
[trixbox1.localdomain default]# ls -l total 16 drwxrwx--- 3 asterisk asterisk 4096 Apr 11 10:04 1234 d-wx-w--wT 3 asterisk asterisk 4096 Apr 11 17:12 601 d-wx-w--wT 7 asterisk asterisk 4096 Apr 14 09:42 602 [trixbox1.localdomain default]#
and
[trixbox1.localdomain default]# ls -l 601 total 4 d-wx-w--wT 2 asterisk asterisk 4096 Apr 11 17:12 INBOX [trixbox1.localdomain default]#
If I fix the permissions, I can retrieve the messages by dialing the * box, but not with the voicemail xml button, but only on the 480i. The 57i works OK.
In addition, the "park" issue exists on this box as well, but in this case it's only with the 57i, and the 480i works fine. I can park by transferring, but not with the "park" button. Nothing happens when I press it while in a call. It just sits there. Taunting me. Parking with the "park" button on the 480i works as I'd expect.
Update: I installed from a 2.6.0.7 CD and the xml voicemail issue is resolved. However, the park issue on the 57i still exists. Pressing the "park" key does nothing. Further, it's now happening on the 480i as well.
Edit: Sigh. My fault.
If you don't have a parking lot configured before you generate the configs using the Aastra scripts, then they don't know where to send the calls.
The park directive in the config was just set to "asterisk;" instead of, say, "asterisk;70" so it couldn't park the calls. Changing that in the configs fixed the issue.
Also, re-generating the configs after creating a parking lot works too.
You'll have to regenerate the configs. Once they're created the template (prf) file isn't read any more.
At the very least, you'll have to delete the MAC.cfg in /tftpboot, but you might also have to edit out the entry in /var/cache/aastra/startup_asterisk.cfg and maybe the extension.* files in /var/cache/aastra. I haven't (obviously) figured out what all is going on in these scripts yet.
There might be a "right" way to do this too that I don't know about.
Thanks KodaK. I didn't realize the MAC.cfg files were being modified. That's pretty obnoxious. Shame on me for running this on a production system without documentation.
I got the phones basically working for my users, but I will have a lot of playing around to do tomorrow.
One thing I noticed tonight before callind it quits was a "Public" button visible during a call. I press it, and it does nothing. It's not referenced in the aastra.cfg or MAC.cfg files as far as I can tell. Granted, I did not delve too deeply just yet, but does anyone know what that button is and what's generating it? I was using a 480i CT for most of my testing...
Thanks
I was wondering about the public button myself. I'll have to see if I can figure it out.
For the record, on my home machine I ended up wiping it out and installing 2.6.0.7 on it and the xml voice mail issue is gone. That was a huge pain in the ass, because I also use that box as my media server, and I have over a TB of movies and music and junk on it that all had to be moved around. Fun evening.
Regarding the Public/Private key, I found this in the admin guide:
For the 480i CT, a public and private softkey can be used at a Directory List line
item. The Private key toggles a number in the Directory List to private. The
Public key allows a number in the Directory List to be sent to the handsets. A
480i CT accepts a maximum of 50 entries with the public attribute.
But I don't really understand how this is used. It's late and I'm tired and I'll deal with it later.
It still goes to speaker unless you pick up the receiver, or if you're wearing a headset, you can press the speaker/receiver/headset button and it will switch too.
You could probably turn off auto-answer and have it ring instead of just start playing, but I haven't tested that.
I have 57i's and have been using ethan's daynight XML script, but the problem is it does not update the other phones when the mode is changed, does the Aastra day night mode script address this? The whole reason for a script like this for me is to change my IVR when we close shop for the day/week. Does no good if it can only be seen on one phone, I need the mode to be visible within a few seconds/minutes on a dozen phones.
Cheers, Nathan
I am using the 57i Aastra phone and trying to use the new scripts.
I am not sure the TFTP server is running properly. I can browse to the aastra web pages so they are on the Trixbox web server. I beleive its not creating the correct .cfg for the phone so it does not load it and therefore go through the initalising phase correctly.
If I use the Solarwinds TFTP Server, it works better and will download firmware etc. but never creates the .cfg file
Probably my TFTP servier is not working correctly oin my Trixbox if at all.
Can anyone help me to work out what to do next. The phones seem excellent otherwise.
Love the new Template
Trix version is 2.4.2
aastra 57i,57ict
is there a way to have missed calls auto clear? not dig though 4 menus?
i have having a real bitch of a time with pagin/intercom i have what i think all the settings up and running and all i get is the Fn beaver sayin that this option is not avaiable.
i am willing to set up a compensation for the paging it wont be big but enought to get a decent burger, and a beer.
thank you
Fn beaver
Did you really just use an archaic misogynistic term to describe a voice prompt, or am I misunderstanding this phrase?
Anyway, you haven't given enough information for anyone to help you. Here's a checklist, though:
1) are your phones set up to allow auto-answer?
2) is the paging module installed?
3) is the paging feature code enabled in general settings?
4) can you use the paging feature code to page (*80EXTNUM)?
5) what do your logs say when it fails?
Paging/intercom.
i have the aastras running, what settings do i have to set for auto answer?
as far as paging/intercom i have enabled the features though feature settings.
i have also setup up a page group 1 so in theory i should be able to dial *801 and paging should work.? right?
if do the page feature of *80303 (i have Extension of 300s) it will work fine.
what do i have to do to get the error codes?
THank you for you help also any idea on the missed call clearing thing on the aastra phones?
i have the aastras running, what settings do i have to set for auto answer?
I'm not sure where it is in the web interface, but the config file options are:
sip intercom line: 1 sip allow auto answer: 1
If you've set up a paging group you don't need the *80, you just dial the paging group number. If your phone responds to *80303 then dialing the paging group number should work.
As for the missed call thing, you've got two choices:
1) configure a button on the main page for "Callers List" if you haven't already. You can do something like:
topsoftkey6 type: callers topsoftkey6 label: "Callers List"
Of course, you can use any button number you'd like, and label it however you'd like.
2) just turn off missed calls:
missed calls indicator disabled: 1
I installed the aastra scripts, rebooted the phone, everything was working. Rebooted again, and now it asks me for the extension and password. I enter it, and it tells me i am already using it on this phone, and prompts me to enter an extension again. What did i do? :/ What can i do to fix it?
Thanks
Maury
As promised in my initial post, a complete documentation of the XML scripts has been posted on the Aastra Telecom Web site at http://www.aastratelecom.com/cps/rde/xchg/SID-3D8CCB6A-211E9C50/0....
Enjoy
aastra1
I want to explicitly thank you for not only following through on your promise of documentation, but on following through in a very professional manner.
A lot of companies would throw together some half-assed docs for a FOSS application, but you guys went above and beyond on this. Thanks a bunch.
mickschjd,
Can you publish the SIP registration part of the MAC.cfg generated by the self-provisioning scripts? If the phone does not register it is because something went wrong in the process of retrieving the user SIP parameters from freePBX/asterisk config files. A quick look at the MAC.cfg (located at /tftpboot) will tell us what's wrong.
Regards
aastra1
Is this install still active?
I ran a yum update AASTRA*
got the following:
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
aastra-ipphone noarch 2.2.0-1 trixbox 18 M
aastra-xml-scripts noarch 1.1.0-1 trixbox 72 k
Transaction Summary
=============================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 18 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): aastra-ipphone-2.2 100% |=========================| 18 MB 06:42
(2/2): aastra-xml-scripts 100% |=========================| 72 kB 00:02
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: aastra-xml-scripts ######################### [1/2]
Installing: aastra-ipphone ######################### [2/2]
Installed: aastra-ipphone.noarch 0:2.2.0-1 aastra-xml-scripts.noarch 0:1.1.0-1
Complete!
Ran the setup-aastra-xml and got the command not found error.
Am I missing soemthing or doing something wrong. I'm running trixbox 2.2.4
I was installing the package on a vmware 2.6 a couple of weeks ago and the install failed. This was becasue of a dependency on mpg123. The dependencies for that package weren't correct.
try installing esound...
yum install esound
and see if that works.
Cheers
Kieran
Thanks for the Scripts guy's Im having a blast playing around with them. This will make our clients very happy.
One thing. When I hit day/night is it only to say day or night or is it suppose to actually change to night or day mode. I can't seem to get it to change the mode.
Any idea's?
Also after I hit the Icom button the day/night button was stuck in night mode. I rebooted the phone and it fixed the problem.
Keep up the good work.
Are these scripts no available in the 2.2.X versions of Trixbox?
Yum will only give me version 1.0.0.1 of the aastra-xml-scripts
Yum will not let me install mpg123, says no match for argument: mpg123
I would LOVE to get the scripts running on 2.2.4
We have plans to upgrade to the 2.6.X tree in a few months but I would like to get these running with 2.2.X

Member Since:
2006-11-06