FreePBX and Sangoma Phones REST Apps


I have a few of the Sangoma S500 phones that I’m trying to get to provision using the RESTaps on a hosted FreePBX platform.

I’ve set the re-director on the Sangoma portal and can see the phone pulling the cfg0500.xml file. However, when the phone tries to pull the {mac}.cfg file it gets error 404. For clarity, if I add the extension manually to the EPM the phone does provision with it’s extension.

What I am trying to do is get the RESTaps working over the HTTP remotely for the Sangoma phones so we can use the proper login / log out and all the other apps. I have not paid for the module, as I was told that it will work for Sangoma phones for free.

The PBX in question has Yealink and Polycom phones connected and using the EPM no problem.

Any help much appreciated.

Kind regards, Nigel.

If the MAC is not added to EPM it wont have a config file so the server will respond with a 404 as no config is found. But when it pulls the cfg0500.cfg if their is not mac.cfg it should prompt you to login with extension and voicemail password as long as you have everything setup correctly as outlined here.

Hi Tony

Not getting as far as being able to log in.

When I press the Login Ext button I get “Failed to load XML file!” displayed on the phone.

I’m sure I’m missing something simple as I have this all working on the Sangoma UC Appliances we have.

Thanks, Nigel.

Hi Tony

If I set the provisioning to the API port as per your instructions I get 401 unauthorised:

X.X.X.124 - - [24/Oct/2016:16:53:08 +0100] “GET /cfg0500.xml HTTP/1.1” 401 492 “-” "Sangoma S500 00:50:58:00:00:00"
X.X.X.124 - - [24/Oct/2016:16:53:15 +0100] “GET /cfg005058000000.xml HTTP/1.1” 401 492 “-” “Sangoma S500 00:50:58:00:00:00”

Must be an Apache issue. I’ll look into that first.

Regards, Nigel.

Hi Tony

Definitely an Apache issue. It is challenging the phones for a username and password on the restapps and resapi ports.

Need to figure that out then I think we are good.

KInd regards, Nigel.

Sounds like you are not using the FreePBX Distro then.

That would be a fair comment.

It has been built on OpenVZ following the instructions here:

Kind regards, Nigel.

OK well we only support Commercial Modules and our Phones with our Distro. I recommend moving to our Distro and off of OpenVZ

Hi Tony

I currently have 14 instances of FreePBX running on OpenVZ all with commercial modules installed and all working just just fine.

This was a bit of a shot to see if I could get the Sangoma phones to work, which I’m sure I will once I get time to look at the Apache issue, which we put in originally 3 years ago to resolve some security issues.

OpenVZ is a great platform for me to use and has not had any reliability problems for over 10 years. I don’t know why you don’t release a version of FreePBX as an OpenVZ image. There are lots of people doing this anyway.

Kind regards, Nigel.