I have FusionPBX installed in Raspbian on a RaspberryPi 3B+, I have been trying to auto provision my Grandstream GXP2140 phone using the "grandstream/gxp2140" template and it was not working, this also appears to affect the gxp2130, gxp2135, gxp2160, gxp2170 (and possibly others but I have not tested)
So to find out why I manually pulled the config using curl like so:
Here is the result
Note: I have already reported this bug but so far no confirmation if they were able to replicate this, could somebody confirm my findings?
Steps to reproduce:
P.S. as a temporary workaround I have been using the older gxp21xx template, but this is based on older firmware and does not have many of the features present in the dedicated gxp2140 template, let me know if there is other information I could provide.
So to find out why I manually pulled the config using curl like so:
Here is the result
Code:
curl -i -u test:changeme --digest http://192.168.15.40/app/provision/aabbccddeeff.cfg
HTML:
HTTP/1.1 200 OK
Server: nginx/1.14.2
Date: Thu, 10 Jun 2021 01:02:55 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: PHPSESSID=6rb6llmk5iv8v8dinjoavo81qd; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
<br />
<b>Fatal error</b>: Uncaught Exception: Unexpected input at line8526:
in /var/www/fusionpbx/resources/templates/engine/smarty/sysplugins/smarty_internal_templatelexer.php:368
Stack trace:
0 /var/www/fusionpbx/resources/templates/engine/smarty/sysplugins/smarty_internal_templatelexer.php(279): Smarty_Internal_Templatelexer->yylex1()
1 /var/www/fusionpbx/resources/templates/engine/smarty/sysplugins/smarty_internal_smartytemplatecompiler.php(123): Smarty_Internal_Templatelexer->yylex()
2 /var/www/fusionpbx/resources/templates/engine/smarty/sysplugins/smarty_internal_templatecompilerbase.php(481): Smarty_Internal_SmartyTemplateCompiler->doCompile('<?xml version="...', true)
3 /var/www/fusionpbx/resources/templates/engine/smarty/sysplugins/smarty_internal_templatecompilerbase.php(402): Smarty_Internal_TemplateCompilerBase->compileTemplateSource(Object(Smarty_Internal_Template), false, NULL)
4 /var/www/fusionpbx/resources/templates/engine/smarty/sysplugins/smarty_template_compiled.php(184): Smarty_Internal_TemplateCompilerBase- in <b>/var/www/fusionpbx/resources/templates/engine/smarty/sysplugins/smarty_internal_templatelexer.php</b> on line <b>368</b><br />
Note: I have already reported this bug but so far no confirmation if they were able to replicate this, could somebody confirm my findings?
Steps to reproduce:
- Create a new Extension and assign/create new Device with any random MAC example aa:bb:cc:dd:ee:ff (because we will simulate provision/pull the config manually,) use the grandstream/gxp2140 template
- Ensure you enable Provision and you have http_auth_username, http_auth_password configured (in my example I use test:changeme credentials)
- Simulate the pull of the phone config from any computer on the network like so:
Code:
curl -i -u test:changeme --digest http://192.168.15.40/app/provision/aabbccddeeff.cfg
P.S. as a temporary workaround I have been using the older gxp21xx template, but this is based on older firmware and does not have many of the features present in the dedicated gxp2140 template, let me know if there is other information I could provide.