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.