Variable not populating - Yealink Provisioning

Status
Not open for further replies.

viiiwonder

Member
Sep 24, 2022
49
2
8
41
So, from what I can tell, yealink provisioning template (y000000000095.cfg) features the following:
static.auto_provision.server.url = {$yealink_provision_url}

...that variable is populated as such by default:
https://{$domain_name}/app/provision/

What I am experiencing is that once I give the phone a provisioning URL (and credentials), it pulls the provisioning config, but as part of that, the setting for the Auto Provisioning Server URL gets set as follows:
1664206643317.png

The 'variable within the variable' seems to not get set/populated.

I saw another post here (https://www.pbxforums.com/threads/provisioning-url-multi-tenant.2598/#post-6972) that seems to indicate to explicitly set the variable properly in the domain settings. I'd love to avoid doing this if possible.

Also, I'm curious if someone can explain how to 'check' the resultant file (e.g. - what URL/files do the Yealink phones actually pull?) I can check the settings located here:

https://[tenantdomain]/app/provision/index.php?mac={mac} (with the appropriate MAC inserted)

however, that only has account settings in it; I'm looking for the results of the y000000000095.cfg file, as it is the one that contains the Auto Provision settings.

Any assistance would be greatly appreciated.
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
I do not believe that you can get variables interpreted in the default/domain settings. The strings are taken literally. Setting individual values per domain may be your only option.

You could maybe modify the provision template to read something like:

Code:
{if isset($yealink_provision_url)}
static.auto_provision.server.url = {$yealink_provision_url}
{else}
static.auto_provision.server.url = {$account.1.server.1.address}
{/if}


To answer your second question you can see what the phone gets using the "Files" button on the device config page.
 

viiiwonder

Member
Sep 24, 2022
49
2
8
41
If variables don't expand out of the default settings, it's frustrating that the 'factory' setting for the yealink provisioning URL has a variable in it...

Your comment inspired me to also just try:
static.auto_provision.server.url = https://{$domain_name}/app/provision/

In y000000000095.cfg, which works nicely.

Ultimately, it all seems a little silly, as we'll be entering the address manually to begin with, and if the template just doesn't change it, it's fine. Guess it's useful if the location ever changes, and/or might be necessary for the Yealink Central Provisioning to work ... that's 'next' to test out.

Thanks for the assist.
 
  • Like
Reactions: Adrian Fretwell

hfoster

Active Member
Jan 28, 2019
684
81
28
34
Yes, it confused the hell out of me too. You'll notice other similar fields have a generic 'server.yourdomain' or something similar. Probably worth a pull request to change it to avoid people thinking you can use variables here.
 
Status
Not open for further replies.