New Aastra xml scripts

donhwyo

Joined
Aug 8, 2008
Messages
293
Likes
0
Points
0
#1
I have been able to get the new xml scripts to install in Elastix. I am not even sure what some of them do yet. Every thing here is at your own risk. Backup everything you can think of. Don't do this on production. ETC ETC

This is from 1 install and 1 upgrade. Your mileage may vary.

First for upgrade from old already working setup. Reread first paragraph. Read it again.

Did you read it and understand it? Yes OR No

No = Close this thread
Yes = Proceed at your own risk. You have been warned!

As I said this is work in progress. This is how aastra said to install the betas. My method follows. I assume that trixbox would update the way I did and it should work and did. Choose your poison. Fix their urls if you want to use the final version.

Code:
cd /tmp
wget http://65.205.71.13/xml-beta/aastra-ipphone-2.4.1-1.noarch.rpm
wget http://65.205.71.13/xml-beta/aastra-xml-scripts-2.2.0-1.noarch.rpm
rpm -e aastra-xml-scripts
rpm -e aastra-ipphone
rpm -i aastra-ipphone-2.4.1-1.noarch.rpm
rpm -i aastra-xml-scripts-2.2.0-1.noarch.rpm
setup-aastra-xml
reboot

Code:
wget http://yum.trixbox.org/centos/5/RPMS/aastra-ipphone-2.4.1-1.noarch.rpm && rpm -Uvh aastra-ipphone-2.4.1-1.noarch.rpm
Code:
wget http://yum.trixbox.org/centos/5/RPMS/aastra-xml-scripts-2.2.0-1.noarch.rpm && rpm -Uvh --force aastra-xml-scripts-2.2.0-1.noarch.rpm
Code:
setup-aastra-xml
Logoff an extension and log back on. You should be on the new scripts.


For a new install. This is what I do for a test box. Do as much or as little as you like. On a test box I like the gui but not in production. Hudlite is optional I have upgraded the versions since the last version in the older thread. If you do this from a clean install it should work. If you have changed passwords (and you should on a production machine) you will need to edit some files. Wait your not supposed to be doing this on a prodution machine are you. Oh well some will.

You can cut and paste from here. Be careful as I don't know if line feed and scrolling may be broken.

Code:
Install cd  Elastix 1.3  #clean install no updates to any thing until this works

yum update yum

yum install nano

nano /etc/sysconfig/network

nano /etc/hosts

Create trixbox repo with default off

#### copy down to ####
echo "[trixbox]
name=trixbox RPM Repository for CentOS and RHEL
baseurl=http://yum.trixbox.org/centos/5/RPMS/ 
gpgcheck=0
enabled=0" > /etc/yum.repos.d/trixbox.repo

####

mkdir /etc/asterisk/hud && chown -R asterisk.asterisk /etc/asterisk/hud && chmod -R 755 /etc/asterisk/hud

yum --enablerepo=trixbox install ircd-hybrid perl-Curses perl-Term-ReadKey perl-Tk perl-Net-DNS perl-POE perl-POE-Component-Client-DNS perl-XML-Simple perl-XML-NamespaceSupport perl-XML-SAX perl-XML-Parser libX11 bind-utils.i386 

wget http://yum.trixbox.org/centos/5/RPMS/hudlite-server-1.4.32-2.i686.rpm && rpm -Uvh hudlite-server-1.4.32-2.i686.rpm --force

wget wget http://yum.trixbox.org/centos/5/RPMS/tbm-hudadmin-2.6.1.0-5.noarch.rpm && rpm -Uvh --nodeps --force tbm-hudadmin-2.6.1.0-5.noarch.rpm 

chconfig ircd on && service ircd start

#hud should be working now


#Next step not needed for KDE. See http://bugs.centos.org/view.php?id=2483

wget http://mirror.centos.org/centos/5/os/i386/CentOS/nautilus-sendto-0.7-5.fc6.i386.rpm  && rpm -Uvh --nodeps nautilus-sendto-0.7-5.fc6.i386.rpm	



yum grouplist    #Shows list of available groups

# Substitute "KDE (K Desktop Environment)" for "GNOME Desktop Environment" if you prefer.  #Not tested

yum groupinstall "X Window System" "GNOME Desktop Environment" firefox

startx

#goto 127.0.0.1 in firefox. Some pages require flash plugin. Click manual install and install the yum repo version.

yum install flash-plugin   #logoff x

#edit /etc/httpd/conf/httpd.conf  change RewriteEngine On to off	# or figure out how to do certificates on phone

service httpd restart

##configure some extensions, paging, parking, conference per the forum above.

yum --enablerepo=trixbox install mDNSResponder-util mpg123

wget http://yum.trixbox.org/centos/5/RPMS/aastra-ipphone-2.4.1-1.noarch.rpm && rpm -ivh aastra-ipphone-2.4.1-1.noarch.rpm

wget http://yum.trixbox.org/centos/5/RPMS/aastra-xml-scripts-2.2.0-1.noarch.rpm && rpm -ivh --force aastra-xml-scripts-2.2.0-1.noarch.rpm 

yum install php-gd

setup-aastra-xml 

chmod -R a+rwx /tftpboot && chown -R asterisk.asterisk /tftpboot



#### copy down to #### edit as needed **** creates /etc/asterisk/phpagi.conf

echo "// example phpagi.conf

[phpagi]

#enable debuging
debug=true

#use internal error handler
error_handler=true

#mail errors to
admin=youremail

#host name of this server
hostname=elastix.yourdomain
# temporary directory for storing temporary output
tempdir=/var/spool/asterisk/tmp/

[festival]
#path to text2wave binary
text2wave=/usr/bin/text2wave

[asmanager]
# server to connect to
server=localhost

# default manager port
port=5038

#username for login
username=admin

#password for login
secret=elastix456

[cepstral]
#alternate text to speech engine
swift=/opt/swift/bin/swift
voice=David" > /etc/asterisk/phpagi.conf

####

wget http://www.elastix.org/images/fbfiles/files/main.txt && mv main.txt /var/www/html/recordings/includes/main.conf.php && chown asterisk:asterisk /var/www/html/recordings/includes/main.conf.php

Edit as needed
Dicko do I have enough warnings in there. B)

Don
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#2
Yes,
Nice, thanks.
I'll try it tomorrow.

Dicko


(and a nice little bonus in the two penultimate lines, kudos!)
 

donhwyo

Joined
Aug 8, 2008
Messages
293
Likes
0
Points
0
#3
I forgot to add one more warning. You may need to read some documentation. Oh wait, never mind. They haven't posted any yet!

We all need to harass Aastra to start supporting us. They are supporting Trixbox and PIAF why not us. They told me no body has asked. I guess that makes me nobody! B)

Their support is on the darkside over at trixbox.org. Soon there phones will be show trixbox when they boot. Oh wait that should be another topic. Never mind.

Don

Beta doc link.
http://65.205.71.13/xml-beta/PA-001009-00-03.pdf

Code:
Link to new docs
http://65.205.71.13/2.2.0/Aastra XML Scripts - Trixbox CE-PA-001009-00-03.pdf
 

donhwyo

Joined
Aug 8, 2008
Messages
293
Likes
0
Points
0
#4

torontob

Joined
May 18, 2008
Messages
219
Likes
0
Points
0
#5
Donhwyo,

Can you please write about your experience with the new xml scripts? Any neat new features? or does it just break stuff and doesn't add anything?

Thanks,
 

donhwyo

Joined
Aug 8, 2008
Messages
293
Likes
0
Points
0
#6
Haven't had time to play with it much yet but there are some nice new features. Look in the trixbox forums. I will be out of town for a week so wont really get to do much with them till I get back. First observation there were many more settings in the config file. And the documentation has improved.

Don
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#7
Don:


I hacked the pbxinaflash script a little:
Code:
cd /usr/src
mkdir aastra
cd aastra
script_version="2.2.0"
phone_version="2.4.1"
SOURCE="http://pbxinaflash.net/source/aastra-xml-$script_version"
wget $SOURCE/mDNSResponder-108.5-1.i386.rpm
wget $SOURCE/mDNSResponder-util-108.5-1.i386.rpm
yum -y install php-gd
yum -y install libtool-ltdl-devel
wget $SOURCE/mpg123-0.59r-1.i386.rpm
wget $SOURCE/aastra-ipphone-$phone_version-1.noarch.rpm
wget $SOURCE/aastra-xml-scripts-$script_version-1.noarch.rpm

# MODIFY FIREWALL RULES FOR MDNS RESPONDER
#echo -n "Modifying firewall rules for mDNSResponder..."
#res=`grep 5353 /etc/sysconfig/iptables`
#if [ "$res" = "-A INPUT -p udp -m udp --dport 5353 -j ACCEPT " ]
#then#
#       echo "Nothing to do"
#else
#       iptables -A INPUT -p udp -m udp --dport 5353 -j ACCEPT >/dev/null 2>/dev/null
#       iptables-save > /etc/sysconfig/iptables 2>/dev/null
#       service iptables restart >/dev/null 2>/dev/null
#       echo "Done"
#fi

# Change read/write mode to be sure + Cleanup
chmod -R a+rwx /tftpboot
chown -R asterisk.asterisk /tftpboot

rpm -ivh mpg123-0.59r-1.i386.rpm
rpm -i aastra-ipphone-$phone_version-1.noarch.rpm
rpm -Uhv --force aastra-xml-scripts-$script_version-1.noarch.rpm
rpm -i mDNSResponder-108.5-1.i386.rpm
rpm -i mDNSResponder-util-108.5-1.i386.rpm



sed -i 's/RewriteEngine Off/RewriteEngine On/g' /etc/httpd/conf/httpd.conf

echo "Aastra XML scripts $script_version successfully installed."
echo "Please run setup-aastra-xml to generate aastra.cfg."
echo "Please reboot your server to finalize the installation."
the commented out bit is too allow mDNS through iptables (which is unfortunately probably not running on most Elastix boxes) and probably not needed in most deployments

It's a philistine hack for which I make no apologies, (what do you expect for 30 mins work) currently the network config bit of setup-aastra-xml will only work if you have a properly setup masqueraded wan/lan type multihomed thingy.

Other than that it works like a champ, and could easily be spliced into your script.

I only checked it with one 57 and a 9133 (same old option 66 tftp:// hack needed) but so far so good
And it was on a beta3 build but I believe it should work on any build (except of course a production system, when it will completely screw up everything BE WARNED!!)

(Make sure your dhcp server is running first)
 

donhwyo

Joined
Aug 8, 2008
Messages
293
Likes
0
Points
0
#8
Great maybe this way will turn out better. I installed the beta version of the scripts to a 1.4 beta so I agree it should work on anything. Maybe some day Aastra will support us Too.

Don
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#9
Don:

(and anyone who cares) when you return, do you care to work on this mutually, ( lets include fail2ban, sort out the stupid but consistent, nat problems problems people have, the fcuk-up when the network "goes away", the integration of the excellent aastra xml scripts to endpoint configuration bits, etc. etc. let's include the beta program but in my experience it needs a kick up the ass from us implimentors, (sorry beta guys, maybe you can't see the forest because of the trees in the way, despite your statement that after abandoning 1.4 and that 1.5 would be "the latest available" software, you fail in many directions, so far core centos, freepbx to name a couple), (I offered my critique and resources but have not yet got a valid response to several of my (I believe) valid concerns) ) (the script would in effect be an "Update Patch" with optional "improvements" for 1.3 while wait for 1.5

Surely this is the best integrated disto, but why are we so stuck in 2007?
(just my 2cents as ever, and I bet it stirs up the chicken coop!)
 

donhwyo

Joined
Aug 8, 2008
Messages
293
Likes
0
Points
0
#10
Sure I would like to do that. If we did it as a module I think it could still be compatible with or at least coexist with the official end point system. I think the Aastra stuff is all gpl so maybe get that into the distro some day.

Failtoban would be an excellent idea. I installed it and it was quite painless. Would love to see that one in the distro. Didn't look at any licensing issues though. Have you heard any more about a security forum lately? Looks like Bob is now a moderator so maybe he will push for it. Got to go look for that thread.

Making an automatic nat system could prove to be a major project on its own. Have you got an idea for this? I use a hodge podge of tools and methods to look at things and could not begin to automate it. Might be easier to give some good examples for some common setups. Maybe a template for people to fill in with what works for them so new people could see what works for other people with similar setup. That of course assumes they would read it.

Gone to Vegas for a business meeting,
Don
 

donhwyo

Joined
Aug 8, 2008
Messages
293
Likes
0
Points
0
#11
I like your version of the scripts better. It gets us away from trixbox and seems to install better.

It seems I missed libtool-ltdl-devel and never noticed it. Thought the force was just to get around some trixbox nonsense. Although I don't see it as a requirement in the docs. libtool-ltdl was installed.

This was on 1.3.

Thanks,
Don

Actually it is in the piaf docs but not the trixbox docs.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#12
Don:
Sorry my friend I suffer from CRS but I believe I forced it to get around a freepx thingy.

I might remind you that you posted the source link in #16552, I just followed it, stripped out it's secretive nature, and brutally kicked it into submission (I find it hard to take credit for that barbarianism, BTW I thought you were in Vegas!)
 

torontob

Joined
May 18, 2008
Messages
219
Likes
0
Points
0
#13
All right, I have a naive question now. I guess the more you know the less you know applies in my case.

Can I simply use the php path in the programable keys of Aastra Phone with the key set to XML but not actually provisioning the phone? I have a situation where phones will not connect to TFTP to download configuration even though server is setup to do so. But I still want to take advantage of the Aastra XML scripts that I have installed. I am specially intrested in DND since it shows DND ACTIVATED and DND DEACTIVATE on screen. I can do this with simply putting *76# to toggle but XML would be nicer. I tried puttin the path for DND php and set the key to XML on an Aastra 53i but it doesn't work.

Any suggestions?
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#14
I don't see why not if the server is available through the firewall/router.

BTW tftp requires udp port 69 to be open through that device, (as ever be cautious of what you open though)
 

torontob

Joined
May 18, 2008
Messages
219
Likes
0
Points
0
#15
Hello All,

What is the Night/Day mode options. It seems to display on all of my Aastra 53i phones while provisioned. I checked the soft keys and there is no daynight.php mode assigned to any of the keys in 53i. This is an annoying display and I am not even sure if it's usefull. How to take it off?

Thanks
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#16
To get the most out of the XML scripts you need to edit the /var/www/html/aastra/asterisk/dem*.prf files. It would probably help if you read the XML documentation available on the aastra site.
 

torontob

Joined
May 18, 2008
Messages
219
Likes
0
Points
0
#17
Hi Dicko,

Unfortunately Day/Night mode is from the beta xml and not documented but I found this:

http://www.trixbox.org/wiki/Aastra-day-night

However, this doesn't help me because I am not sure as to why the phone picks up Night mode by default or does it even display night/day mode.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#18
Just comment it out in 53i section of the .prf file and reprovision the phones
 

torontob

Joined
May 18, 2008
Messages
219
Likes
0
Points
0
#19
My friend, by defautl, 53i section in user-demo.prf does not include these lines:

Code:
#prgkey3 type:xml
#prgkey3 label:Day/Night
#prgkey3 value:http://$$AA_XML_SERVER_AA$$/$$AA_XMLDIRECTORY_AA$$/asterisk/daynight.php?user=$$SIPUSERNAME$$
And I haven't added any Night/Day mode. What happens is that the phone has a display of NightMode all the time on this phone. So, it's not only 53i section of config in the .prf file that determines the display on this phone. It's probably set somewhere else and I am trying to find it. Also, apparently it ties with FreePBX Day/Night which I don't know where that is...

Thanks
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#20
Hmm. . .
What is in the <mac>.cfg files in /tftpboot? something is setting those keys, which key is set and what does the http server on the phone show for that key?
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,916
Messages
130,921
Members
17,596
Latest member
salman0.0
Top