Disable yealink pcmu in autoprovision file

Status
Not open for further replies.

mattswainston

Member
Sep 27, 2018
44
1
8
52
Hi All,

I'm trying to stop some of my customers sound like Darleks by removing the pcmu and pcma codecs in autoprovision.

I see the $yealink_codec_pcmu_enable in the mac.cfg file and have added a setting in the web interface on fusionpbx so that

name value enabled description
yealink_codec_pcma_enabled 0 True PCMA disable

but the file produced doesnt seem to set the variable

any ideas what i have missed please>?
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,414
376
83
Here is a screenshot from my default settings page, PCMA is enabled and PCMU is not:

Screenshot from 2021-10-18 17-09-47.png

PS: Customers sounding like Darleks may be an indicator of network issues which are not forced to only effect G711 codecs. It helps to fully understand exactly what the problem is before going for a solution.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
I'm kind of of the opinion these days that if they can't support g711 then I don't want them as customers. I could envisage never ending support issues, especially if they had PCs on the same internet connection.
 

flagman

Member
Dec 1, 2020
30
2
8
40
I have the same problem on FusionPBX 4.5.26 with only Yealink T29G, T46G and T48G phones, but there is no issue on FusionPBX 4.1.0.
 

mattswainston

Member
Sep 27, 2018
44
1
8
52
Agreed, when I delete the codec from the phone manually the darlek issue dissapears though so hence why I am trying to get this value in the autoprovision for the device.

Does the default value override the phone setting?

My issue is that the phone setting does not create a codec entry on the phones config file....
 

hfoster

Active Member
Jan 28, 2019
677
80
28
34
Some of the configs are a bit half complete, and only have variables for the first account: T46S Template. I've been meaning to power through these all one day, as I have to support the most stupidly large array of Yealink models and submit the changes.

Oh, and also the variable is 'isset'. It's not a true or false, so whatever the value (except for 'null') will enable it, even 'false', 'FALSE', or '0'. Don't ask me why, I'm not sure myself.
 

hfoster

Active Member
Jan 28, 2019
677
80
28
34
Isset just tests if the variable has been declared and is not null. So by setting the "enabled" flag to false in default settings prevents its declaration.
https://www.php.net/manual/en/function.isset.php
Yeh, this is what you *should* do. I also change the value so I don't get confused when scrolling through the list. 'True False' always confuses my brain.

I was just confused as to why this variable uses it in the configs, where as everything else expects a 0 or 1.
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,414
376
83
Using isset is a convenient way of making a variable available for use in a provision template without having to use or declare the variable unless you actually want to use that config option. So it can be in a provision template without the need for it to be in default settings etc. until it is needed to be used. Basically, it doesn't matter if it is missing. I hope that makes sense.
 

mattswainston

Member
Sep 27, 2018
44
1
8
52
When I set the value to false in the default variables all works ok, cannot for the life of me get it to work in the device provisioning though any Idea's. Also the default values sets for all domains - is there any way of setting the variable per domain?
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,414
376
83
s there any way of setting the variable per domain?
Yes, in default settings, select the variables (records) you are interested in and click on the copy button, then a dropdown will appear where you can select the domain, choose the domain and click paste. Now you have those variable in the domain (Advanced->Domains) so you and override them for that domain as you see fit.
 

hfoster

Active Member
Jan 28, 2019
677
80
28
34
I hope that makes sense.
Err, well not really because the rest of the Yealink templates just employs that logic with blanks instead. If it's declared, the value is used in the template, if not it's blank and left as per the device default. This flips it on its head and says if it's not declared, explicitly set it to 0, if it is, set it to '1' even if the value is '0'.

Unless I'm really getting the wrong end of the stick. I've changed this in a few of our templates where a few of the lower admins got caught in a similar trap.
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,414
376
83
I get what you mean. I was thinking about entries like:

Code:
{if isset($account.1.password) }
account.1.enable = 1
{else}
account.1.enable = 0
{/if}

Where by account.1.enable gets set to 1 if $account.1.password is declared irrespective of the value of $account.1.password

The point I was making earlier about variables you may not [often] use is demonstrated by this entry I put in one of my templates:

Code:
{if isset($pickup_blf_visual_enable)}
features.pickup.blf_visual_enable = {$pickup_blf_visual_enable}
{/if}

The setting only gets sent to the phone is the variable is declared, otherwise nothing.
 
Status
Not open for further replies.