FreePBX Contact Manager to Yealink Address Book



  • I wrote this a while back but never made a dedicated topic.

    https://github.com/sorvani/freepbx-helper-scripts/blob/master/ContactManager_to_Yealink_AddressBook/cm_to_yl_ab.php

    To use this, you need to drop it on your FreePBX in the /var/www/html folder

    cd /var/www/html
    wget https://raw.githubusercontent.com/sorvani/freepbx-helper-scripts/master/ContactManager_to_Yealink_AddressBook/cm_to_yl_ab.php
    chown asterisk:asterisk cm_to_yl_ab.php
    

    Then edit it to reflect the appropriate group.

    nano cm_to_yl_ab.php
    

    Change this line to match what is in the Contact Manager. (in my shot below this would become Clients.

    // Edit this varibale to match the name of hte group in Contact Manager
    $contact_manager_group = "SomeName";
    

    Contact manager is located under Admin
    9a464485-c55b-4f21-96e9-4fbf349919fc-image.png
    There are groupings. I always make these "external"
    837cd608-8480-4eb8-ad4c-87441a82edfa-image.png

    You can then navigate to your PBX like this: http://pbx.domain.com/cm_to_yl_ab.php
    96dcd7c6-b8c5-4a96-beb9-0331e704ab35-image.png

    You put it in your Yealink phone config like this.
    Note: Remote Phonebook 1 = XML Phonebook 0 in the DSS key

    remote_phonebook.data.1.name = ContactManager
    remote_phonebook.data.1.url = http://pbx.domain.com/cm_to_yl_ab.php
    programablekey.1.type = 22
    programablekey.1.label = Contacts
    programablekey.1.xml_phonebook = 0
    

    Or if you do it manually in the phone GUI.
    78f58aa0-87a2-4798-b356-8bb0c199ea14-image.png
    d29faaab-78a1-4089-a5ed-3a5d89d27deb-image.png



  • On a related note, I just tried to make a large import for a client and found a bug in the Bulk Handler module.
    https://issues.freepbx.org/browse/FREEPBX-18843



  • You can use HTTPS, but you need to be aware that Yealink phones have issues with Let's Encrypt certificates unless you are on one of the most recent firmware versions of the current S series phones (T42S, T48S, etc.).