ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    FreePBX Contact Manager to Yealink Address Book

    IT Discussion
    freepbx yealink address book contact manager
    12
    39
    15.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      Chrischevy
      last edited by

      I've been using this script for a while and it worked very well. However, I have a problem with FreePBX 15.
      It seems that the script is not pulling the contacts correctly. I see some data on the chart created by the script, but I don't know where it comes from (see image)

      182e2a19-138e-42e7-a515-29c55d30092c-image.png

      The same issue is present on 2 different systems, both on FreePBX 15.
      All my FreePBX 14 are fine.

      JaredBuschJ 1 Reply Last reply Reply Quote 0
      • JaredBuschJ
        JaredBusch @Chrischevy
        last edited by JaredBusch

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

        I've been using this script for a while and it worked very well. However, I have a problem with FreePBX 15.
        It seems that the script is not pulling the contacts correctly. I see some data on the chart created by the script, but I don't know where it comes from (see image)

        182e2a19-138e-42e7-a515-29c55d30092c-image.png

        The same issue is present on 2 different systems, both on FreePBX 15.
        All my FreePBX 14 are fine.

        I updated the repo last week to handle this.
        https://github.com/sorvani/freepbx-helper-scripts/issues/8

        1 Reply Last reply Reply Quote 0
        • JaredBuschJ
          JaredBusch @mgbolts
          last edited by

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

          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.

          I have also updated my original script to handle most of this.

          The sub sort by label order is not yet impelmented.

          1 Reply Last reply Reply Quote 0
          • C
            cinergi
            last edited by

            Just came across your script. It's working great here - thank you! I made a small change to remove all non-numeric characters from phone numbers (like +, (), - , etc.), otherwise my Yealink phone doesn't dial the number properly from the directory. It only required 1 line of code in the main loop:

            $contact['number'] = preg_replace("/[^0-9]/", "", $contact['number']);
            

            One question: what is the purpose of the "label=" in the <Telephone> XML tag? This is not documented in Yealink's XML documentation, and although the script generates it properly for Home, Work, Mobile, and Other, my SIP-T29G phone seems to ignore it and instead indicates multiple numbers as Number1, Number2, etc. which is not great. I wish it used the tags. Do other Yealink phones support this?

            Thanks again!

            JaredBuschJ 2 Replies Last reply Reply Quote 0
            • JaredBuschJ
              JaredBusch @cinergi
              last edited by JaredBusch

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

              One question: what is the purpose of the "label=" in the <Telephone> XML tag? This is not documented in Yealink's XML documentation, and although the script generates it properly for Home, Work, Mobile, and Other, my SIP-T29G phone seems to ignore it and instead indicates multiple numbers as Number1, Number2, etc. which is not great. I wish it used the tags. Do other Yealink phones support this?

              Those labels started in some version of the phones, yes. I know it works in the T4 series and the T5 series.

              1 Reply Last reply Reply Quote 0
              • JaredBuschJ
                JaredBusch @cinergi
                last edited by

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

                I made a small change to remove all non-numeric characters from phone numbers (like +, (), - , etc.), otherwise my Yealink phone doesn't dial the number properly from the directory.

                How are you getting bad data in the directory to being with? At least I would consider that bad data in the source.

                Are you using Contact Manager? If so, someone had to put those extra characters in there.

                1 Reply Last reply Reply Quote 0
                • A
                  alanbaker
                  last edited by

                  Hi, I'm testing in a lab environment for now, I have followed the instructions and created a internal contact manager group calling Internal, I have added one contact into it with an extension. When I browse to the cm_to_yl_ab.php file it gives the following error: -

                  This page contains the following errors:
                  error on line 3 at column 22: Opening and ending tag mismatch: CompanyIPPhoneDirectory line 0 and DirectoryEntry
                  Below is a rendering of the page up to the first error.

                  In a red box with nothing else shown, I have rebooted the pbx but same thing, can you advise.

                  Thanks in advance.

                  Alan

                  JaredBuschJ 1 Reply Last reply Reply Quote 1
                  • JaredBuschJ
                    JaredBusch @alanbaker
                    last edited by

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

                    Hi, I'm testing in a lab environment for now, I have followed the instructions and created a internal contact manager group calling Internal, I have added one contact into it with an extension. When I browse to the cm_to_yl_ab.php file it gives the following error: -

                    This page contains the following errors:
                    error on line 3 at column 22: Opening and ending tag mismatch: CompanyIPPhoneDirectory line 0 and DirectoryEntry
                    Below is a rendering of the page up to the first error.

                    In a red box with nothing else shown, I have rebooted the pbx but same thing, can you advise.

                    Thanks in advance.

                    Alan

                    Make sure you have one entry in Contact Manager. I never designed it to handle zero contacts.

                    There is an issue posted on that already, but I have not had the free time to work on it.
                    https://github.com/sorvani/freepbx-helper-scripts/issues/12

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      alanbaker @JaredBusch
                      last edited by

                      Thanks for the quick reply, it makes sense I’ll populate with a number and try again.
                      @JaredBusch

                      1 Reply Last reply Reply Quote 0
                      • E
                        enaran
                        last edited by

                        I am having some problems implementing the script.

                        I have followed the direction to install it in /var/www/html
                        Ran chown
                        Edited the script to set the $contact_manager_group to Clients - which I have made in FreePBX v15.0.17.24 - Asterisk V16.15.0
                        I have loaded one contact into this group
                        When I execute the script by navigating to http://10.0.0.120/cm_to_yl_ab.php I recieve the error:
                        PDOException (21000)
                        SQLSTATE[21000]: Cardinality violation: 1242 Subquery returns more than 1 row

                        Any advice would be awesome
                        Cheers
                        Screen Shot 2021-03-30 at 3.12.07 pm.png
                        Screen Shot 2021-03-30 at 3.02.35 pm.png

                        JaredBuschJ 1 Reply Last reply Reply Quote 0
                        • JaredBuschJ
                          JaredBusch @enaran
                          last edited by

                          @enaran execute the SQL from command line and post the results

                          E 1 Reply Last reply Reply Quote 0
                          • E
                            enaran @JaredBusch
                            last edited by

                            @jaredbusch thank you.
                            I posted the SQL at the command line and it returned the same error.

                            I figured it out though as I seemed to have a Clients group in both the External and Private Contact Manager Areas - hence the return of two records in the subquery.

                            I deleted the Clients Group from the Private area leaving just the one in the External area, and it started working.

                            Cheers

                            1 Reply Last reply Reply Quote 0
                            • A
                              alanbaker
                              last edited by

                              Jared,

                              This has been working so well!

                              I bet you were waiting for this question which is, can a second instance be run so we have two directories listed, one for the internal phonebook and a second for example external suppliers (Using the external phonebook in contact manager?

                              Thanks so much

                              Alan

                              JaredBuschJ 1 Reply Last reply Reply Quote 0
                              • JaredBuschJ
                                JaredBusch @alanbaker
                                last edited by JaredBusch

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

                                Jared,

                                This has been working so well!

                                I bet you were waiting for this question which is, can a second instance be run so we have two directories listed, one for the internal phonebook and a second for example external suppliers (Using the external phonebook in contact manager?

                                Thanks so much

                                Alan

                                If you update to the current version, it accepts a parameter for the group name. So you can different directories on different buttons or say, per site.

                                1 Reply Last reply Reply Quote 0
                                • K
                                  krek
                                  last edited by

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

                                  If you update to the current version, it accepts a parameter for the group name. So you can different directories on different buttons or say, per site.

                                  Good afternoon, is it possible to output two groups in one xml?

                                  JaredBuschJ 1 Reply Last reply Reply Quote 0
                                  • JaredBuschJ
                                    JaredBusch @krek
                                    last edited by

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

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

                                    If you update to the current version, it accepts a parameter for the group name. So you can different directories on different buttons or say, per site.

                                    Good afternoon, is it possible to output two groups in one xml?

                                    Not as currently designed, but yes.

                                    K 1 Reply Last reply Reply Quote 0
                                    • K
                                      krek @JaredBusch
                                      last edited by

                                      @jaredbusch
                                      The development is super. I would also like to add the union of two different groups from internal and Extension into one xml and you can assign only one button, there will be fire.

                                      1 Reply Last reply Reply Quote 0
                                      • A
                                        alanbaker
                                        last edited by

                                        Jared,

                                        Hi, I have just received found the yealink handset is no longer receiving the phonebook, I navigated to the link http://my pbx domain.com/cm_to_yl_ab.php and the page showed 403 Forbidden, You don't have permission to access /cm_to_yl_ab.php on this server.

                                        I have in the past seen the XML information on this page.

                                        Any Ideas?

                                        Thanks
                                        Alan

                                        1 Reply Last reply Reply Quote 0
                                        • V
                                          vgvelukashvili
                                          last edited by vgvelukashvili

                                          Good day,

                                          Is it possible to add the option in to the script to grab the Contact Images as well? Would be great

                                          JaredBuschJ 1 Reply Last reply Reply Quote 0
                                          • JaredBuschJ
                                            JaredBusch @vgvelukashvili
                                            last edited by

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

                                            Good day,

                                            Is it possible to add the option in to the script to grab the Contact Images as well? Would be great

                                            How does that get put into a yealink contact xml?

                                            1 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 2 / 2
                                            • First post
                                              Last post