• ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
The HP Community is where owners of HP products, like you, volunteer to help each other find solutions.
HP Recommended

Hi, I using a config file which the phone picks up from tftp server on our phone system (Freepbx).  The contacts all show OK on the phone, but if I go to try and search a contact (even if I type the name exactly), it won't find anything.  We have 70 users, so having to manually scroll through the entire list will be an issue.  Below is an example of what the file looks like:

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- $RCSfile: 000000000000-directory~.xml,v $  $Revision: 1.3 $ -->
<directory>
    <item_list>
        <item>
            <ln> Diaz </ln>
            <fn> Test </fn>
            <ct> 101 </ct>
        </item>
        <item>
            <ln> Carraro </ln>
            <fn> Smith </fn>
            <ct> 102 </ct>
        </item>
        <item>
            <ln> Schmitz </ln>
            <fn> Test </fn>
            <ct> 106 </ct>
        </item>
        <item>
            <ln> Zaino </ln>
            <fn> Smith </fn>
            <ct> 107 </ct>
        </item>
    </item_list>
</directory>

I have tried updating one of the phones to the latest firmware (as of 22/08/2018), but makes no difference.  Just wondering if the contact directory file is missing something to allow it to be searchable or there is something else I am missing to get this working? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
HP Recommended

In case anyone else is having this issue, I have found out what is causing it.  It seems you have to specific all the options in the polycom directory xml (even if you are not using them) or you can't search on the phone. 

I was using a script from Thyrus Gorges which pulls all the extensions from FreepBX and creates the file.  But had a adjust his script so it adds the missing options:

(more info on the script: https://gist.github.com/thyrusg/b3b2d556f71514e53527)

 

#!/bin/bash

# Author: Thyrus Gorges
# Date: 2015/03/04

#The MIT License (MIT)

#Copyright (c) <2015> <Thyrus Gorges>

#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:

#The above copyright notice and this permission notice shall be included in
#all copies or substantial portions of the Software.

#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#THE SOFTWARE.


# Build a Polycom Directory XML file
# by pulling the usernames and extensions of all SIP users

# Set so we can loop on newlines instead of spaces
IFS=$'\n'

# MySQL Creds
SQLUSER=root
SQLPASS="password"

# Declare our file
FILE=/tftpboot/contacts/000000000000-directory.xml

# Remove old file
rm $FILE

# ReCreate our file
touch $FILE


# Write the header of the file
# Passing the -e option to echo allows us to use tabs
echo -e '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' >> $FILE
echo -e '<!-- $RCSfile: 000000000000-directory~.xml,v $  $Revision: 1.3 $ -->' >> $FILE
echo -e '<directory>' >> $FILE
echo -e "\t<item_list>" >> $FILE


# Query Database
# We pass -N to MySQL so it doens't print headers
# CS:  Original command below, modified to remove password
for i in $( mysql -u $SQLUSER -p$SQLPASS -N -e "use asterisk; select extension, name from users;" ); do
# for i in $( mysql -u $SQLUSER -N -e "use asterisk; select extension, name from users;" ); do
        # Assign Variables to each field
        EXTEN=`echo $i | cut -f1`
        FN=`echo $i | cut  -f2 | cut -d" " -f1`
        LN=`echo $i | cut -d" " -f2`
        # The item tag is the beginning of a contact
        echo -e "\t\t<item>" >> $FILE
        echo -e "\t\t\t<ln> $LN </ln>" >> $FILE
        echo -e "\t\t\t<fn> $FN </fn>" >> $FILE
        echo -e "\t\t\t<ct> $EXTEN </ct>" >> $FILE
	echo -e "\t\t\t<sd>0</sd>" >> $FILE
	echo -e "\t\t\t<rt>3</rt>" >> $FILE
	echo -e "\t\t\t<dc>0</dc>" >> $FILE
	echo -e "\t\t\t<ad>0</ad>" >> $FILE
	echo -e "\t\t\t<ar>0</ar>" >> $FILE
	echo -e "\t\t\t<bw>0</bw>" >> $FILE
	echo -e "\t\t\t<bb>0</bb>" >> $FILE
        echo -e "\t\t</item>" >> $FILE
done

# Write file endings
echo -e "\t</item_list>" >> $FILE
echo -e "</directory>" >> $FILE

 

View solution in original post

7 REPLIES 7
HP Recommended

Just to add, I am using software version:

Polycom UC Software 5.8.0.12848

HP Recommended

Hello @Giotech,

welcome to the Polycom Community.

I am not aware of any known issues so I suggest you verify your configuration and if you need to take this further please open a ticket.


In order to raise a support ticket you need to work with your Polycom reseller as they need to do this for you.

End Customers are unable to open a ticket directly with Polycom support.

If this is some sort of an Internet discounter please post either your phone's MAC address or your Polycom devices serial so I can look up who would be able to support you. This may not be who you purchased the Polycom device from.

If the unit is no longer within warranty please be prepared to Pay Per Incident / PPI. This is all outlined in detail here

Please ensure to provide some feedback if this reply has helped you so other users can profit from your experience.

Best Regards

Steffen Baier

Polycom Global Services

------------------------------------------------
Notice: I am an HP Poly employee but all replies within the community are done as a volunteer outside of my day role. This community forum is not an official HP Poly support resource, thus responses from HP Poly employees, partners, and customers alike are best-effort in attempts to share learned knowledge.
If you need immediate and/or official assistance for former Poly\Plantronics\Polycom please open a service ticket through your support channels
For HP products please check HP Support.

Please also ensure you always check the General VoIP , Video Endpoint , UC Platform (Microsoft) , PSTN
HP Recommended

Thanks for replying, are you able to check who we would need to call, MAC for one of the phones is:

64167f989cc5

HP Recommended

In case anyone else is having this issue, I have found out what is causing it.  It seems you have to specific all the options in the polycom directory xml (even if you are not using them) or you can't search on the phone. 

I was using a script from Thyrus Gorges which pulls all the extensions from FreepBX and creates the file.  But had a adjust his script so it adds the missing options:

(more info on the script: https://gist.github.com/thyrusg/b3b2d556f71514e53527)

 

#!/bin/bash

# Author: Thyrus Gorges
# Date: 2015/03/04

#The MIT License (MIT)

#Copyright (c) <2015> <Thyrus Gorges>

#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:

#The above copyright notice and this permission notice shall be included in
#all copies or substantial portions of the Software.

#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#THE SOFTWARE.


# Build a Polycom Directory XML file
# by pulling the usernames and extensions of all SIP users

# Set so we can loop on newlines instead of spaces
IFS=$'\n'

# MySQL Creds
SQLUSER=root
SQLPASS="password"

# Declare our file
FILE=/tftpboot/contacts/000000000000-directory.xml

# Remove old file
rm $FILE

# ReCreate our file
touch $FILE


# Write the header of the file
# Passing the -e option to echo allows us to use tabs
echo -e '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' >> $FILE
echo -e '<!-- $RCSfile: 000000000000-directory~.xml,v $  $Revision: 1.3 $ -->' >> $FILE
echo -e '<directory>' >> $FILE
echo -e "\t<item_list>" >> $FILE


# Query Database
# We pass -N to MySQL so it doens't print headers
# CS:  Original command below, modified to remove password
for i in $( mysql -u $SQLUSER -p$SQLPASS -N -e "use asterisk; select extension, name from users;" ); do
# for i in $( mysql -u $SQLUSER -N -e "use asterisk; select extension, name from users;" ); do
        # Assign Variables to each field
        EXTEN=`echo $i | cut -f1`
        FN=`echo $i | cut  -f2 | cut -d" " -f1`
        LN=`echo $i | cut -d" " -f2`
        # The item tag is the beginning of a contact
        echo -e "\t\t<item>" >> $FILE
        echo -e "\t\t\t<ln> $LN </ln>" >> $FILE
        echo -e "\t\t\t<fn> $FN </fn>" >> $FILE
        echo -e "\t\t\t<ct> $EXTEN </ct>" >> $FILE
	echo -e "\t\t\t<sd>0</sd>" >> $FILE
	echo -e "\t\t\t<rt>3</rt>" >> $FILE
	echo -e "\t\t\t<dc>0</dc>" >> $FILE
	echo -e "\t\t\t<ad>0</ad>" >> $FILE
	echo -e "\t\t\t<ar>0</ar>" >> $FILE
	echo -e "\t\t\t<bw>0</bw>" >> $FILE
	echo -e "\t\t\t<bb>0</bb>" >> $FILE
        echo -e "\t\t</item>" >> $FILE
done

# Write file endings
echo -e "\t</item_list>" >> $FILE
echo -e "</directory>" >> $FILE

 

HP Recommended

Noticed a mistake in the script I posted, this is the correct one:

#!/bin/bash

# Author: Thyrus Gorges
# Date: 2015/03/04

#The MIT License (MIT)

#Copyright (c) <2015> <Thyrus Gorges>

#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:

#The above copyright notice and this permission notice shall be included in
#all copies or substantial portions of the Software.

#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#THE SOFTWARE.


# Build a Polycom Directory XML file
# by pulling the usernames and extensions of all SIP users

# Set so we can loop on newlines instead of spaces
IFS=$'\n'

# MySQL Creds
SQLUSER=root
SQLPASS="password"

# Declare our file
FILE=/tftpboot/contacts/000000000000-directory.xml

# Remove old file
rm $FILE

# ReCreate our file
touch $FILE


# Write the header of the file
# Passing the -e option to echo allows us to use tabs
echo -e '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' >> $FILE
echo -e '<!-- $RCSfile: 000000000000-directory~.xml,v $  $Revision: 1.3 $ -->' >> $FILE
echo -e '<directory>' >> $FILE
echo -e "\t<item_list>" >> $FILE


# Query Database
# We pass -N to MySQL so it doens't print headers
# CS:  Original command below, modified to remove password
for i in $( mysql -u $SQLUSER -p$SQLPASS -N -e "use asterisk; select extension, name from users;" ); do
# for i in $( mysql -u $SQLUSER -N -e "use asterisk; select extension, name from users;" ); do
        # Assign Variables to each field
        EXTEN=`echo $i | cut -f1`
        FN=`echo $i | cut  -f2 | cut -d" " -f1`
        LN=`echo $i | cut -d" " -f2`
        # The item tag is the beginning of a contact
        echo -e "\t\t<item>" >> $FILE
        echo -e "\t\t\t<ln>$LN</ln>" >> $FILE
        echo -e "\t\t\t<fn>$FN</fn>" >> $FILE
        echo -e "\t\t\t<ct>$EXTEN</ct>" >> $FILE
	echo -e "\t\t\t<sd>0</sd>" >> $FILE
	echo -e "\t\t\t<rt>3</rt>" >> $FILE
	echo -e "\t\t\t<dc></dc>" >> $FILE
	echo -e "\t\t\t<ad>0</ad>" >> $FILE
	echo -e "\t\t\t<ar>0</ar>" >> $FILE
	echo -e "\t\t\t<bw>0</bw>" >> $FILE
	echo -e "\t\t\t<bb>0</bb>" >> $FILE
        echo -e "\t\t</item>" >> $FILE
done

# Write file endings
echo -e "\t</item_list>" >> $FILE
echo -e "</directory>" >> $FILE
HP Recommended

Hello @Giotech,

The community's VoIP FAQ contains this post here:

Jan 6, 2012 Question: How can I create a local directory or what is the 000000000000-directory.xml used for?

Resolution: Please check => here <=

 

The above post has a XLS file and a Perl Script example archiving the same.


Best Regards

Steffen Baier

Polycom Global Services

------------------------------------------------
Notice: I am an HP Poly employee but all replies within the community are done as a volunteer outside of my day role. This community forum is not an official HP Poly support resource, thus responses from HP Poly employees, partners, and customers alike are best-effort in attempts to share learned knowledge.
If you need immediate and/or official assistance for former Poly\Plantronics\Polycom please open a service ticket through your support channels
For HP products please check HP Support.

Please also ensure you always check the General VoIP , Video Endpoint , UC Platform (Microsoft) , PSTN
HP Recommended

This was helpful, but not entirely clear that there was a syntax error in the original script with relation to spaces in the FN and LN, so adding a note on it.

 

Original script and "broken" searchc (I imagine if you put a space at the beginning of your search, it would work).

 

        echo -e "\t\t\t<ln> $LN </ln>" >> $FILE
        echo -e "\t\t\t<fn> $FN </fn>" >> $FILE
        echo -e "\t\t\t<ct> $EXTEN </ct>" >> $FILE

 

 

Fixed:

 

        echo -e "\t\t\t<ln>$LN</ln>" >> $FILE
        echo -e "\t\t\t<fn>$FN</fn>" >> $FILE
        echo -e "\t\t\t<ct>$EXTEN</ct>" >> $FILE

 

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.