How to tell Yealink phones to upload user changes to the FreePBX provisioning directory



  • Expanding on what I did here: How to backup your Yealink local contacts to the FreePBX provisioning directory, thanks again to @xrobau for posting that polycom script. It was my genesis to create all of this.

    Yealink offers a great setting in their phones to let you protect user settings. If you enable this, it will look for a mac-local.cfg file during the provisioning process and those settings will override any settings in the common config (y0000000000XX.cfg), and the device config (mac.cfg). Additionally, the phones can be told to sync any changes of non-static settings back to provisioning server.

    Here are the relevant settings, they are only settable via auto-provisioning.

    static.auto_provision.custom.protect =
    static.auto_provision.custom.sync =
    static.auto_provision.custom.sync.path = 
    static.auto_provision.custom.upload_method =
    

    From page 59 (or 79 according to the PDF viewer) of the Administrator Guide V83_30, here is what you can do with those settings.
    aaa32b40-d831-4843-8cdb-4efc23cb88c7-image.png
    844109ad-fa3a-465a-9b10-371f7376c720-image.png
    1ed14f72-cf8c-4a48-b922-8e3661fd1fac-image.png

    To make use of this I had to add some handling to the put.yealink file, but that is the only change to the repository.

    The rest is simply deciding where you want your values and such.

    As the administrator guide notes, when using the value custom.protect = 1 there is a forced priority applied to the configuration files.

    The highest priority is the Phone/Web UI. And those settings are read from the mac-local.cfg on every reboot.
    f76b6a19-1897-477c-b129-7db4c1c03d8c-image.png



  • So to make this work:

    1. simply follow the instructions in the other post to get the put.yealink and the yealink.conf files on your FreePBX server in the right place, with the right permissions.

    2. Then in your y0000000000XX.cfg file set protect = 1

    static.auto_provision.custom.protect = 1
    
    1. Reboot your phone or tell it to auto provision.

    At this point your phone will internally begin tracking changes to non-static settings and putting them in the mac-local.cfg file internally.

    1. If you want them to sync up to your FreePBX system, add the sync line to the y0000000000XX.cfg file.
    static.auto_provision.custom.sync = 1
    

    Now here is a big catch if you implement this to a system where you already have everything set up. Notice that I said it will begin tracking changes. All the settigns you push down in the existing y0000000000XX.cfg and mac.cfg files are still valid.

    Simply if the same setting is found in the mac-local.cfg it will override the other files.



  • The IT benefit to this entire thing is, by enabling this feature, IT will now have a backup of the configuration of all the phones. Even if a user changes a button. Now a phone can die and IT will simply change the MAC on the provisioning server and put the new phone on the desk.

    To the business, the benefit is to let users control their own buttons without IT getting involved. Buttons can easily be programmed by a user simply holding it down until the menu pops up. It takes very little instruction to teach users to pick Speed Dial or BLF and enter the number or extension.

    For most small shops, this doesn't matter in the first place. They rarely change anything.

    But for an organization over 20, it is very common to have users all needing different configurations on their phone buttons. Their Boss, their Queue Pause, their specific parking lots, etc.