Provisioning HT812 or 814

Status
Not open for further replies.

gs_qxc

New Member
Feb 13, 2023
11
0
1
47
Hi All,

I've search the forums to find the answer, so apologies if I missed the post which explains the solution to my problem.

We have a Grandstream HT812 which I am attempting to provision via FusionPBX. I've set up the template in fusion, added the
MacId of the device and set the following info on the device:
1717086059612.png

When the device attempt to talk to the server, it does not present its MACID.

We get the following requests (before it fails):

/var/log/nginx/access.log.1:XXXXXXXXXXXXXXX - -
[29/May/2024:22:31:52 -0400] "GET /app/provision/cfght812.xml HTTP/1.1"
404 153 "-" "Grandstream Model HW HT812 V3.1A SW 1.0.53.3 DevId ec74d-------"

/var/log/nginx/access.log.1:XXXXXXXXXXXXXXXX - -
[29/May/2024:22:31:52 -0400] "GET /app/provision/cfg.xml
HTTP/1.1" 404 153 "-" "Grandstream Model HW HT812 V3.1A SW 1.0.53.3 DevId ec74d----"

If I add the macid Config File Prefix, it looks for cfgMACID.xml .

The template file exists in fusionpbx/resources/templates/provision/grandstream/ht812/
and is '{$mac}cfg.xml' (I have also copied it to {$mac}.xml as well as cfg.xml...)

I updated the firmware... and it still the same.

What might I be doing wrong?
 

gs_qxc

New Member
Feb 13, 2023
11
0
1
47
PS I have also updated the php to look for {$mac}cfg.xml, since I am getting
12:00:09 [error] 1381762#1381762: *24666 open() "/var/www/fusionpbx/app/provision/MACIDcfg.xml" failed (2: No such file or directory),

it hasn't helped.
 

voipBull

Member
Dec 3, 2023
57
10
8
The sequence the GS HT series ATA's look for, for its config file is;

cfgxxxxxxxxxxxx (Binary file)
cfgxxxxxxxxxxxx.xml
cfg.xml

Here xxxxxxxxxxxx is the LAN MAC of the device in lowercase.

I'd say match your template file in FusionPBX to be cfg{$mac}.xml
 

gs_qxc

New Member
Feb 13, 2023
11
0
1
47
If I do not force the grandstream to show a MACID using a prefix (where the prefix is the MACID), I don't see a request with a macid. I see the HT trying to request the config using cfght812.xml or just plain cfg.xml. Is there may be some check box I've missed? I agree that the documentation suggests the this is the case: https://www.grandstream.com/hubfs/Product_Documentation/ht81x_administration_guide.pdf but it doesn't seem to be doing that.
 

voipBull

Member
Dec 3, 2023
57
10
8
You shouldn't have to add anything in the config prefix or postfix, thats only for when you have multiple different versions of the config file differentiated with some prefix or postfix value. I just looked at the logs for one of my HT-814 and it looks for the config file as I mentioned above, in that sequence.
 

gs_qxc

New Member
Feb 13, 2023
11
0
1
47
You are correct, I am not sure why I have been having problems. I cleaned out the things in the device and do indeed see:
[30/May/2024:17:29:11 -0400] "GET /app/provision/cfgMACID.xml HTTP/1.1" 200 64543 "-" "Grandstream Model HW HT812 V3.1A SW 1.0.53.3 DevId MACID"

Now to debug whatever else remains of my provisioning problems. Thank you for the polite nudge... I would have been tearing my hair out.
 

gs_qxc

New Member
Feb 13, 2023
11
0
1
47
Here's what was throwing me, it gets a 200 but asks for other configs:
IPADDR - - [30/May/2024:17:29:11 -0400] "GET /app/provision/cfgMACID.xml HTTP/1.1" 200 64543 "-" "Grandstream Model HW HT812 V3.1A SW 1.0.53.3 DevId MACID"
IPADDR - - [30/May/2024:17:29:12 -0400] "GET /app/provision/cfgMACID HTTP/1.1" 200 64543 "-" "Grandstream Model HW HT812 V3.1A SW 1.0.53.3 DevId MACID"
IPADDR - - [30/May/2024:17:29:12 -0400] "GET /app/provision/cfght812.xml HTTP/1.1" 404 153 "-" "Grandstream Model HW HT812 V3.1A SW 1.0.53.3 DevId MACID"
IPADDR - - [30/May/2024:17:29:12 -0400] "GET /app/provision/cfg.xml HTTP/1.1" 404 153 "-" "Grandstream Model HW HT812 V3.1A SW 1.0.53.3 DevId MACID"


Would that happen if the config is not correct?
 

voipBull

Member
Dec 3, 2023
57
10
8
That is fine. It will always ask for ALL those other files as well even though it already received the cfgMAC.xml or any one of those other config files. Its just how GS ATA are.
 

gs_qxc

New Member
Feb 13, 2023
11
0
1
47
Thank you again-I would have been chasing after phantoms. It is still not registering, and none of the Fusion info is making it into the device. I copied the 814's fusion template... I assume they are the same and I am only provisioning one extension.
 

voipBull

Member
Dec 3, 2023
57
10
8
Could be the template itself now. Look into the syslog on the device with it set to 'EXTRA DEBUG', that'll tell you if and what it doesn't like in the config file. OR if you're familiar with the GS config file structure and parameters, download it directly from your FusionPBX and give it a read, you may find something obvious.
 

voipBull

Member
Dec 3, 2023
57
10
8
814 does have more P-parameters than 812 (Additional P-parameters for port 3 and 4 on the 814), I don't think that'll make it reject the whole config file but it may, I never tried that.
 

gs_qxc

New Member
Feb 13, 2023
11
0
1
47
It looks like it isn't happy with the template, because even a manual upload of the config does not set things up correctly.
 

gs_qxc

New Member
Feb 13, 2023
11
0
1
47
I have set up syslog server, set the ip and can see that a directory is created on the syslog server for the device. However, there is no output there.
 
Jan 9, 2018
152
15
18
54
Try manually putting the config on the device (download from Device page, then upload in the ATA's web GUI). This will confirm whether there is an issue with your template. If it uploads and registers successfully, then you know the problem is the file name, or some rewrite setting in Nginx and not with the file contents.

We use our own custom template for these because we have it tuned for fax, which is our primary use case. But we do use the same template for both 812 and 814.
 

gs_qxc

New Member
Feb 13, 2023
11
0
1
47
Hey! Another great suggestion. It looks like the default HT814 template on Fusion does not play nice with this version of the firmware. I manually filled in the config parameters using the WebGui and then exported the config. I templatized the config. If I manually go to fusion and grab the config, and then upload it using the gui it takes the parameters EXCEPT for the password P2 and it does not register. The password field is empty in the FXSPorts tab. There is some impediment to communicating with Fusion and the config still isn't exactly right. When I manually upload the config, it says "
Provision:
Not running, Last status : Configuration update completed.
"
When I attempt to use FusionPBX to provision it says, "Downloading file"


Our use case is very similar to yours, @Jonathan Black.
 

gs_qxc

New Member
Feb 13, 2023
11
0
1
47
Thanks for everyone's help. I got this work, but it isn't as straightforward as one would like:
1. Provision a syslog server or else it is pain woe and misery!
2. Log into the device and manually set up the device, get it to register and run it.
3. Download the active xml version of the running config.
4. Grab fusion's template for the 814 and look at the templatized variables that exist (new to this)
5. Replace the provisioning server, extensions, and other parameters with the template variables.
6. Save the template to cfg\{\$mac\}.xml under <fusionsrc>/resources/templates/provision/grandstream/ht812
7. In a webrowser (or using curl/wget) pull down the template and make sure it renders correct xml.
8. Reboot the phone.

There are still some items which are problematic:
1. P2 (admin pwd) doesn't seem to be settable. Perhaps the pwd I am using is not consistent with the "high security" settings and I need to
twiddle them.
2. The unit complains about not having the latest firmware as backup, even though it is running the latest.
 
Jan 9, 2018
152
15
18
54
Setting P2 works fine for us, no particular requirements on complexity that I know of. (we have over 50 of these units deployed, either ht812 or ht814, with a few ht818s as well.)

I do not recall seeing the message about the backup firmware. I haven't been in the GUI of a brand new one in a while, though.

Fortunately, now that you have a working template, you shouldn't have to be either!

If you haven't already, I highly recommend checking out GDMS (gdms.cloud). We use it for zero-touch provisioning of all Grandstream devices. We mainly just redirect to our FusionPBX server for provisioning, but the zero-touch is nice, as is the ability to see if a device is active and remotely reboot/reset it. There are some folks on here who use it for complete provisioning, but in my opinion, that doesn't work as well at scale--you would have to copy in info from FusionPBX to GDMS for the accounts/extensions, and why keep it in two places?
 
Status
Not open for further replies.