Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

Workaround for incomplete Phonebook

Discussion in '3CX Phone System - General' started by Rainer, May 11, 2017.

Thread Status:
Not open for further replies.
  1. Rainer

    Joined:
    May 11, 2017
    Messages:
    5
    Likes Received:
    0
    Hello Everybody,

    there are lots of posts in the forum compaining about the missing phonebook entries in the 3CX xml phonebooks. This affects all phone types because it seems to be a limitation in 3CX itself.

    We've produced two scripts to produce a fully populated, complete xml phonebook. The first script is a powershell script to extract the contacts to a CSV file. The second one is php script serving the contact info as XML. Currently it produces XML for Yealink phones, but it's probably easy to adapt this to Snom and others as well.

    We run the powershell export script daily via TaskScheduler and then just put the php script on an internal server. Then we pointed the phonebook URL in the yealink template files to this script. Now the phonebooks at least show all contact numbers; there is still no type for each number, but that's a limitation of yealink and it's not really an issue for us.

    You can find the two files attached. The powershell script runs on our Windows Server 2012 and the php script was tested on Debian/Apache. On the Windows machine you will need to install the Exchange Web Services Manage API (can be found on https://www.microsoft.com/en-us/download/details.aspx?id=42951).

    Hope this helps somebody!

    Best Regards
    Rainer
     

    Attached Files:

  2. sofiane

    Joined:
    Jul 1, 2014
    Messages:
    20
    Likes Received:
    9
    Hi, I have tried on linux/3cx/ machine but seems not working. Anything miss?
    Thank you
     
  3. Rainer

    Joined:
    May 11, 2017
    Messages:
    5
    Likes Received:
    0
    Hi Sofiane,

    I don't know your setup. Do you have apache running on your 3CX host? We are currently using a separate webserver to perform the translation from CSV into XML with the Php script.
     
  4. sofiane

    Joined:
    Jul 1, 2014
    Messages:
    20
    Likes Received:
    9
    Hi Rainer, I am using Nginx in local 3cx host
     
  5. Rainer

    Joined:
    May 11, 2017
    Messages:
    5
    Likes Received:
    0
    Ah I see, that would indeed be nice to have it on the 3CX machine directly, that's true. I'll test it there whenever we need to alter it again. For now we have it on Apache. And I really hope 3CX will fix this issue themselves so we don't need any external scripts anymore to have a complete phone book.
     
Thread Status:
Not open for further replies.