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.).



  • I have implemented the contact manager (not using the phone gui) and it works PERFECTLY - thank you.
    The "Contacts" button appears on the bottom of the phones home screen (handset on hook) and works beautifully. However, if the handset is lifted to make a call, the bottom menu changes to reflect the settings in the phone gui - Settings/Soft Keys/Dialing Empty" and I can longer see "Contacts".
    Is there a way I can get the same Contacts functionality without resorting to changing Yealink xml templates?
    Yealink T46S - firmware 66.84.0.15
    Freepbx - 14.0.11
    Asterisk - 16.3.0

    Thank you for any assistance.
    Regards



  • @DingoBlue said in FreePBX Contact Manager to Yealink Address Book:

    I have implemented the contact manager (not using the phone gui) and it works PERFECTLY - thank you.
    The "Contacts" button appears on the bottom of the phones home screen (handset on hook) and works beautifully. However, if the handset is lifted to make a call, the bottom menu changes to reflect the settings in the phone gui - Settings/Soft Keys/Dialing Empty" and I can longer see "Contacts".
    Is there a way I can get the same Contacts functionality without resorting to changing Yealink xml templates?
    Yealink T46S - firmware 66.84.0.15
    Freepbx - 14.0.11
    Asterisk - 16.3.0

    Thank you for any assistance.
    Regards

    Yes, those are changeable. No, I do not recall where off the top of my head. I will have to look once I have a phone I can access.



  • @DingoBlue said in FreePBX Contact Manager to Yealink Address Book:

    However, if the handset is lifted to make a call, the bottom menu changes to reflect the settings in the phone gui - Settings/Soft Keys/Dialing Empty" and I can longer see "Contacts".

    You can only edit those via configuration files.

    They are called "softkey"

    Here is a Yealink PDF on the configuration

    The better answer will be to instruct users to push that menu button first instead of picking up the phone first.



  • @JaredBusch said in FreePBX Contact Manager to Yealink Address Book:

    @DingoBlue said in FreePBX Contact Manager to Yealink Address Book:

    However, if the handset is lifted to make a call, the bottom menu changes to reflect the settings in the phone gui - Settings/Soft Keys/Dialing Empty" and I can longer see "Contacts".

    You can only edit those via configuration files.

    They are called "softkey"

    Here is a Yealink PDF on the configuration

    The better answer will be to instruct users to push that menu button first instead of picking up the phone first.

    Yeah, sadly - people always just want to grab the handset before doing anything else - hard habit to break.



  • @Dashrender said in FreePBX Contact Manager to Yealink Address Book:

    @JaredBusch said in FreePBX Contact Manager to Yealink Address Book:

    @DingoBlue said in FreePBX Contact Manager to Yealink Address Book:

    However, if the handset is lifted to make a call, the bottom menu changes to reflect the settings in the phone gui - Settings/Soft Keys/Dialing Empty" and I can longer see "Contacts".

    You can only edit those via configuration files.

    They are called "softkey"

    Here is a Yealink PDF on the configuration

    The better answer will be to instruct users to push that menu button first instead of picking up the phone first.

    Yeah, sadly - people always just want to grab the handset before doing anything else - hard habit to break.

    You need to use the correct language.

    You don't press send first on your cell phone.

    Don't pick up your desk phone first either.



  • Thank you for all your replies.
    I was hoping for a simple edit in the FreePBX End Point Manager Basefile but not to be 😞
    My chances of training the users in the regard is between nil and negligible so time for some reading!
    Regards



  • @DingoBlue said in FreePBX Contact Manager to Yealink Address Book:

    I was hoping for a simple edit in the FreePBX End Point Manager Basefile but not to be

    That is simple. Your post implied not using the EPM.

    Edit: Or maybe I misread that document on the train this morning.. Let me read more carefully.

    Clarification: It is simple to edit the soft keys with EPM. You can add any valid config code in basefile edit. That is what it is for.

    It is not obvious on how to make a soft key load an XML page. I can see how to make it go to a directory, but would have to test things.



  • Sorry - I should have mentioned EPM. I used EPM to make the other changes as per your thread above.
    Thank you again.



  • Clarification: It is simple to edit the soft keys with EPM. You can add any valid config code in basefile edit. That is what it is for.

    It is not obvious on how to make a soft key load an XML page. I can see how to make it go to a directory, but would have to test things.

    Any luck with your research?



  • Dear All,

    Thanks for the help regarding this script and general instructions to get it going.

    I have made some edits to the script to allow for multiple numbers for each name, ie. each name appears once but has multiple labelled numbers, eg. work, cell etc. just like your cell phone....

    https://github.com/mgbolts/fpbx-yealink-xmlcontacts/blob/master/cm_to_yl_ab_L2.php

    Thanks
    Mark



  • @mgbolts said in FreePBX Contact Manager to Yealink Address Book:

    Dear All,

    Thanks for the help regarding this script and general instructions to get it going.

    I have made some edits to the script to allow for multiple numbers for each name, ie. each name appears once but has multiple labelled numbers, eg. work, cell etc. just like your cell phone....

    https://github.com/mgbolts/fpbx-yealink-xmlcontacts/blob/master/cm_to_yl_ab_L2.php

    Thanks
    Mark

    That's been a when I get to it thing. so thanks!



  • Another update to the script.

    https://github.com/mgbolts/fpbx-yealink-xmlcontacts/blob/master/cm_to_yl_ab_L2.php

    Updates are as follows:

    a) I have added the ability to customise your own number labels. eg. I did not like cell or internal being the default label from fpbx. I wanted Mobile and Extension.

    b) I wanted the ability to choose the display order for the set of numbers for each name. The issue was that it was random and I also wanted my chosen number to be the default number displayed against the name. This was particularly where I pulled in to the internal contact list. In this case, I wanted the extension to be the default and not some random number like cell etc.

    c) It now has the ability to use the number as input (the default) or use the auto generated E164 format from FPBX. This may not be useful for most users, but is helpful where you have users in more than jurisdiction and each country has its own int dialing prefix, eg. AU is 0011 and other countries use different prefixes. It does require you to select the correct country when creating the contact number in fpbx. Further instructions in the code.



  • @mgbolts Awesome!