Line button Labels

I want to change the display name in my provisioning template from the user name to the extension number. I do see any references for variables etc. Is this possible? Am I missing something? I was thinking I could create a template for each extension.

Hello,

On the templates you will find an account or accounts variable that depends on the phone model, you can replace $account[‘device_name’] it with the following for example $account[‘extension’]

What’s the phone model btw? to give you more specific instructions

I’m using T29G’s and T48G’s. Thanks I will give that a go.

You can replace

account.{{ $loop->iteration }}.label = {{ $account['description'] ?? null }}
account.{{ $loop->iteration }}.display_name = {{ $account['description'] ?? null }}

with

account.{{ $loop->iteration }}.label = {{ $account['extension'] ?? null }}
account.{{ $loop->iteration }}.display_name = {{ $account['extension'] ?? null }}

Thanks appreciate it. I’ll have to do this later, usual put out this fire going on lol.

Tried it last night and worked. Thanks much.

When I attempted, I got the following error:

An exception has occurred
Exception: [500-get] {https://127.0.0.1/provisioning/api/provision/MACADRESSREMOVED}: {“message”:"[/usr/share/provisioning/storage/framework/views/c1c81c23149563e604d3550e8286f76001080fcd.php:94] syntax error, unexpected ‘extension’ (T_STRING), expecting ‘]’ (View: )"} at file /usr/share/vitalpbx/www/includes/components/provisioning/RestClient.php on line 0

Error Trace

File Function

1 /usr/share/vitalpbx/www/index.php:0 app\Core->run(…args);
2 /usr/share/vitalpbx/www/includes/app/Core.php:0 app\Core->_loadModule(…args);
3 /usr/share/vitalpbx/www/includes/app/Core.php:0 app\Core->loadModuleAction(…args);
4 /usr/share/vitalpbx/www/includes/app/Core.php:0 modules\provisioning_templates\provisioning_templates->put(…args);
5 /usr/share/vitalpbx/www/modules/provisioning_templates/provisioning_templates.php:0 modules\provisioning_templates\ProvisioningTemplate->save(…args);
6 /usr/share/vitalpbx/www/modules/provisioning_templates/ProvisioningTemplate.php:0 modules\provisioning_templates\ProvisioningTemplate->_updateProvisioningFiles(…args);
7 /usr/share/vitalpbx/www/modules/provisioning_templates/ProvisioningTemplate.php:0 modules\provisioning\Device->generateProvisioningFile(…args);
8 /usr/share/vitalpbx/www/modules/provisioning/Device.php:0 provisioning\RestClient->Retrieve(…args);
9 /usr/share/vitalpbx/www/includes/components/provisioning/RestClient.php:0 provisioning\RestClient->_sendRequest(…args);

It seems there’s a missing quote please make sure the quote is properly closed like this $account[‘extension’]

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.