Integration of Aastra Scripts and Endpoint Manager

oneobserver

Joined
Jun 2, 2008
Messages
64
Likes
0
Points
0
#1
I'm looking at what it would take to integrate the Aastra scripts with the Endpoint Manager. The primary need with these is to get the Aastra scripts to use the Endpoint managers database to identify the configured phones instead of the flat file Aastra built them with. I can integrate the scripts if I can get somebody to help me with the DB interface. Can somebody help me develope a couple of PHP scripts that will do the following:

1) When supplied with a Mac Address, return True if the Address is in the database, and False if it isn't.

2) When supplied with the Mac Address, Name, Type, and Extension, add the phone to the database.

3) When supplied with the Mac Address, Name, Type, and Extension, remove the phone from the database.

With those three things I can make the scripts work either as Aastra intended or from the Manager the same way. I'm having trouble translating to English and understanding the DB interface, so any help would be appreciated! :huh:

Secondary question: Why do we set a type in the Endpoint Manager, if there doesn't appear to be a way to pass it into the vendor scripts to allow phone specific configurations. All I can see in the existing scripts is one template for every phone from that vendor. Polycom handles it by allowing all phones to be configured in the same file, but Aastra is a little more specific...

markh aka oneobserver
 

oneobserver

Joined
Jun 2, 2008
Messages
64
Likes
0
Points
0
#2
So after digging through the other vendor request lines, I figured out how to pass the model down to the vendor configuration script. With that I was able to convert the Aastra ".prf" file that is used to autoconfigure the phones at startup as supplied by Aastra, to an Endpoint Manager Vendor configuration script. I had a couple of places where I had to make a guess on phone types though. From Aastra's site the 6730i and 6731i's documentation indicate they work like a 9480i, so I put them in that set. The drop down list has a 9143i and I cannot find that one on the Aastra site, so I didn't put in an extended configuration for it.

The changes I made are attached as a patch file. Please feel free to check my coding and make suggestions.

Still need help with the DB access files components if somebody can give me some pointers, I would appreciate it.

markh aka oneobserver
 

oneobserver

Joined
Jun 2, 2008
Messages
64
Likes
0
Points
0

oneobserver

Joined
Jun 2, 2008
Messages
64
Likes
0
Points
0
#4
One last note. This is based on eth Aastra 2.2.1 scripts for Elastix, and Elastix version 1.6, but should also work with earlier versions that had my https conversions added.

Also, I edited the files that had the Visual Voicemail application in it so it's there, but commented out and the Voicemail button uses *97 instead. If you want to use the XML Application, change which blocks are commented out. There are 3 of them in that file.
 

oneobserver

Joined
Jun 2, 2008
Messages
64
Likes
0
Points
0
#5

Barbanegra

Joined
Nov 19, 2009
Messages
11
Likes
0
Points
0
#6
Re:Integration of Aastra Scripts and Endpoint Mana

This is great! I was editing the files in /tftboot directly to configure the prgkeys for the 9143i s that I have. Will give the patch a try...and add the couple of lines I need for the 9143i.
 

Barbanegra

Joined
Nov 19, 2009
Messages
11
Likes
0
Points
0
#7
Re:Integration of Aastra Scripts and Endpoint Mana

I made a copy of the file, moved the patch into the directory.
I got the following message:
Code:
patch < AastraScripts_patch-88d97f13258137c4023d85f54c43a04e.txt 
(Stripping trailing CRs from patch.)
patching file paloSantoFileEndPoint.class.php
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
3 out of 3 hunks ignored -- saving rejects to file paloSantoFileEndPoint.class.php.rej
(Stripping trailing CRs from patch.)
can't find file to patch at input line 46
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|*** /var/www/html/modules/endpoint_configuration/libs/vendors/Aastra.cfg.php.orig	2009-11-13 15:21:29.000000000 -0800
|--- /var/www/html/modules/endpoint_configuration/libs/vendors/Aastra.cfg.php	2009-11-15 23:51:42.000000000 -0800
--------------------------
File to patch:
As you see I backed out of the patch. What am I doing wrong?
 

oneobserver

Joined
Jun 2, 2008
Messages
64
Likes
0
Points
0
#8
Re:Integration of Aastra Scripts and Endpoint Mana

Hmmm, looks like I need to make an install script to go with this as well, since it is based on my "development" environment. You need to make copies of each of the files that it modifys (so you keep original source). I copied my originals to filename.orig, and that is why you can't find the source files. Just copy the paloSantoFileEndPoint.class.php to paloSantoFileEndPoint.class.php.orig and Aastra.cfg.php to Aastra.cfg.php.orig and it should work just fine.

There is one more change you probably want to make. In the Aastra.cfg.php file at lines 247 and 358 the line should be:

sip line1 screen name 2: Extension $id_device

Otherwise it shows the users name instead of the extension. It was a bug in the original Aastra scripts.

Improvements that still need to be added are to pull the Park extension out of the database. In this it is hard coded for 70, and to add the databse update code to the Aastra Setup scripts so they integrate the rest of the way with the endpoint manager.

Now if somebody could just figure out how to program the sidecars from the endpoint manager...
 

Barbanegra

Joined
Nov 19, 2009
Messages
11
Likes
0
Points
0
#9
Re:Integration of Aastra Scripts and Endpoint Mana

Thanks!
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,887
Members
17,565
Latest member
omarmenichetti
Top