Aastra phones - HTTP auto provisioning

Status
Not open for further replies.

alcoutop

New Member
May 1, 2019
26
5
3
34
Hi everyone,

I started playing with FusionPBX last month but since then, I've been struggling to auto provision my aastra phones using HTTP provisioning.
I mostly followed the steps from:
http://wiki.fusionpbx.com/index.php?title=Phones

Looking at the logs, by changing the http path on the phone, I would get different http erros.
/app/provision would give me 401.
leaving it blank would give me 301.

After many trial and error attempts, I finally got 200, with all files (technically) loaded. But in the phone logs (server.cfg) I would see "Invalid mac address"
For this specific attempt, I used this http path:
/app/provision/index.php?mac=$1 last

I also added the rewrite rules described on the wiki page (although it was already set on my fusionpbx files).
*provision has been enabled, as well as http user/password auth (although I am not quite sure where to put it on the phones - I guess sip global config, that is where I placed it).

TFTP provisioning is working good but I guess fusionpbx brings a lot of benefit with HTTP provisioning.
Any help will be greatly appreciated

Thank you!
 

smn

Member
Jul 18, 2017
201
20
18
I know I did have this working with Aastra phones at one time. I don't think anyone is testing it with Aastra phones anymore.

Maybe have a look at v4.2 code. I think that is what it was at when I had it working. I don't think it was correct and I had to change something but I don't remember what.
 

alcoutop

New Member
May 1, 2019
26
5
3
34
@smn I am using FusionPBX version 4.4.5 and freeswitch 1.8.5. I believe I am up to date.

After many trial and error attempts, I tried to use the following http path:
/app/provision/index.php?mac=$1
/app/provision/?mac=$1&file=aastra.cfg (this also gives 200 msg)

Using this path I got HTTP 200 from the logs, but when I opened the server.cfg from the phone I got

invalid mac address
invalid mac address
invalid mac address

Here is my rewrite rules:
//etc/nginx/sites-enabled

#aastra
rewrite "^.*/provision/aastra.cfg$" /app/provision/?mac=$1&file=aastra.cfg;
rewrite "^.*/provision/([A-Fa-f0-9]{12})(\.(cfg))?$" /app/provision/?mac=$1 last;
 
Last edited:

smn

Member
Jul 18, 2017
201
20
18
These were the rewrite rules I used for Apache.

R
Code:
RewriteRule ^.*/provision/aastra.cfg$   app/provision/index.php?mac=$1&file=aastra.cfg [QSA]

RewriteRule ^.*/provision/([A-Fa-f0-9]{12})(\.(xml|cfg))?$ app/provision/index.php?mac=$1 [QSA]

You can simulate extensions using curl to see how Fusion is responding. All you need to know is the header your phone sends. You can get that by watching port 80 on Fusion.

Code:
tcpdump port 80 -i eth0 src x.x.x.x -nA

Once you have that you can simulate the phone using curl to see how Fusion responds.

I don't have an Aastra simulation example but here are a couple other phones.

Code:
curl -H "Accept: */*" -H "Panasonic_KX-UT670/01.022 (0080f000000)" http://somedomain.com/provision/001575e5aa8d.cfg
curl -H "Accept: */*" -H "User-Agent: Grandstream Model HW GXP2135 SW 1.0.7.97 DevId 000b928aa872" http://somedomain/provision/000b928aa872.cfg
 
Last edited:
Status
Not open for further replies.