Auto provisioning - issues with proxy settings and default settings

pbxguru

New Member
Nov 7, 2024
6
1
3
49
Hello Folks!

I hope this is the right place. I'm running 5.2 on Debian 12 and things are working great. I've been working on getting zero-touch provisioning to work with our Yealink RPS and YMCS account.

So far, based on what I read in these forums, we got auto provisioning working - somewhat.

1. Reset phones find Fusion server.
2. Phones connect and download its config.
3. Most settings are configured on phones (extension, etc.)

Despite getting most configs down, we're missing proxy server settings. When manually adding proxy settings on device's portal, it registers.

So far, we have these two issues.

1. Cannot seem to enable proxy server settings. Despite adding the settings under Devices, it simply does nothing. Trying to add the following Yealink parameters:

outbound_proxy =
outbound_port =
outbound_proxy_enable =

Is the device page the best place to add proxy settings?

Another issue is Yealink's YMCS management.

2. YMCS requires at least two parameters in order to add/manage supported devices in your YMCS account. These are:

dm.enable = {yealink_static_dm_enable}
dm.server.address = {yealink_static_dm_server_address}

I have added the parameters in the T19 cfg file. I also added the missing variables under Default Settings | Provision category, but when I attempt to provision, nginx logs show exceptions:

error.log

2024/11/08 15:10:58 [error] 813#813: *66779 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "file:/var/www/fusionpbx/resources/templates/provision/yealink/t19p/y000000000053.cfg" on line 1340 "dm.enable = {yealink_static_dm_enable}" unknown tag 'yealink_static_dm_enable' <--
thrown in /var/www/fusionpbx/resources/templates/provision/yealink/t19p/y000000000053.cfg on line 1340" while reading response header from upstream, client: x.x.x.x, server: *.xxxxx, request: "GET /app/provision/y000000000053.cfg HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:"

2024/11/08 15:10:59 [error] 813#813: *66784 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "file:/var/www/fusionpbx/resources/templates/provision/yealink/t19p/{$mac}.cfg" on line 2049 "dm.enable = {yealink_static_dm_enable}" unknown tag 'yealink_static_dm_enable'

access.log

xxx@xxxx:/var/www/fusionpbx/resources/templates/provision/yealink/t19p# tail -f /var/log/nginx/access.log
x.x.x.x - - [08/Nov/2024:15:10:58 +0000] "GET /app/provision/y000000000053.cfg HTTP/1.1" 200 433 "-" "Yealink SIP-T19P_E2 53.84.0.15 80:5e:c0:8d:0f:b6"
x.x.x.x - - [08/Nov/2024:15:10:59 +0000] "GET /app/provision/805ec08d0fb6.cfg HTTP/1.1" 401 23 "-" "Yealink SIP-T19P_E2 53.84.0.15 80:5e:c0:8d:0f:b6"
x.x.x.x - - [08/Nov/2024:15:10:59 +0000] "GET /app/provision/805ec08d0fb6.cfg HTTP/1.1" 200 419 "-" "Yealink SIP-T19P_E2 53.84.0.15 80:5e:c0:8d:0f:b6"

I have flushed cache and reloaded XML, but nothing. Wondering what I'm doing wrong.

Thanks!
 

Attachments

  • ymcs_Screenshot 2024-11-08 100425.png
    ymcs_Screenshot 2024-11-08 100425.png
    8 KB · Views: 4

hfoster

Active Member
Jan 28, 2019
684
81
28
34
You're missing the dollar signs in the variables. As for the SIP outbound proxy issue, that's part of the line information along with port, etc. Shouldn't be anything necessary you need to change in the template.

(There is a brand new Yealink firmware that doesn't like sip_server_host anymore, so possibly related. Still investigating this one though, might submit a pull request if I can work out why)
 

pbxguru

New Member
Nov 7, 2024
6
1
3
49
Oh my gosh! You were right. I was missing the $ character in the variable in the CFG file. After updating it and clearing cache, the YMCS settings were added automatically.

Next is proxy settings. I noticed the attached blank setting in the MAC's cfg template. There is no variable set at all. I will see about modifying this and get back to you.

Thank you.
 

Attachments

  • proxy_Screenshot 2024-11-11 130905.png
    proxy_Screenshot 2024-11-11 130905.png
    15.5 KB · Views: 1
Last edited:

pbxguru

New Member
Nov 7, 2024
6
1
3
49
Ok, I tried updating the proxy settings on the MAC.cfg file. Only two settings are getting set (outbound port and outbound proxy). However, I can't seem to get the account_1_proxy_enable setting to set.

If I manually set account_1_proxy_enable = 1 - it works.
If I set it to the declared variable in default settings, it does not work.

Exporting all settings from the phone shows no variable for account_1_proxy_enable.
I have recreated the default setting and flushed cache.
Other two settings work.
No tag errors or exceptions in error.log
Wondering if I'm missing something.
 

Attachments

  • Def_Sett_Prox_Screenshot 2024-11-11 215912.png
    Def_Sett_Prox_Screenshot 2024-11-11 215912.png
    7.4 KB · Views: 4
  • outbound_proxy_Screenshot 2024-11-11 215144.png
    outbound_proxy_Screenshot 2024-11-11 215144.png
    8.8 KB · Views: 5