Device Profiles not taking effect

Status
Not open for further replies.

s2svoip

Member
Dec 9, 2019
259
8
18
44
Seeing some funny behavior trying to set a device settings via a profile, specifically on a Yealink phone, I am using a profile thats programmable buttons are working just fine on the device, but when I set a value in settings it is not taking effect, specifically

static.auto_provision.repeat.enable / Value = 1 / Enabled = True
static.auto_provision.repeat.minutes / Value = 10 / Enabled = True

everything else I have done via default settings, and I have set a programmable button via the same profile which works, but this one settings seams to do nothing.

I checked on the phones HTTP interface for the correct setting and value to set for what I am trying to change and its correct but I cant get this to take affect

has anyone seem any similar behavior with custom settings in profiles for Yealink devices ?
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
Setting a provision variable only has an effect if it is coded into the provision template. For example if you look at:
/var/www/fusionpbx/resources/templates/provision/yealink/t46s/{$mac}.cfg
You will see lines like:
Code:
account.1.label = {$account.1.display_name}
account.1.display_name = {$account.1.display_name}
account.1.auth_name = {$account.1.auth_id}
This is where the variables in your device provision settings get merged with the template and sent out to the phone. The provision templates use the smarty template engine https://www.smarty.net/

You can add your own items to the template, I just modify the ones provided, but the Fusion team recommend making a copy of the template directory and putting your customised code in that. For example cp t46s ct46s.

You could just simply add those values to the bottom of the template, I do that with a few like this:
Code:
##########################################################################################
##                         Added by A2 Engineering Services                             ##
##########################################################################################

phone_setting.ringing_timeout = 600
features.pickup.direct_pickup_code = **
features.pickup.direct_pickup_enable = 1


If you want to use a device provision variable you can do it like this, I had a customer that wanted to disable Do not Disturb:
Code:
{if isset($dnd_enable)}
features.dnd.allow = {$dnd_enable}
{/if}

And it the Devices page it looks like this:
Screenshot from 2020-01-26 09-06-43.png

I hope that helps.
 
  • Like
Reactions: s2svoip

s2svoip

Member
Dec 9, 2019
259
8
18
44
that worked flawlessly, that is really handy thanks Adrian.

I made an assumption that you could add any lines of config via the custom settings, would still be a nice feature to be able to just append any setting you want to the cfg file via the GUI, but also only takes 5 mins to edit the files

I seam to remember stumbling across a GUI file editor in fusion as documented here:

https://docs.fusionpbx.com/en/latest/advanced/editors.html

but I have since not been able to find it anyone, you do need to chmod the files in order to use it tho from what I remember. anyone know where this editor went ? or is it just hidden in a menu I am not seeing
 
  • Like
Reactions: Adrian Fretwell

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
No, they are not hidden. They have been removed from the latest builds for security reasons. They are now in separate repositories so you can fetch them and add them back in manually, at your own risk, if you wish.
 

s2svoip

Member
Dec 9, 2019
259
8
18
44
No, they are not hidden. They have been removed from the latest builds for security reasons. They are now in separate repositories so you can fetch them and add them back in manually, at your own risk, if you wish.

I thought I was going crazy! I had a long chat with Mark a few weeks ago, very nice guy and he said their main focus is security right now so I guess thats what spurred this on, It was very convenient but as the expression goes good security is often not convenient.
 
Status
Not open for further replies.