WP820 - XML Phonebook Guide

  • Updated on January 4, 2022

The WP820 supports a phonebook that can hold up to 1000 records. Entering 1000 phonebook records through the phone keypad is a time-consuming and error-prone task. The WP820 supports an XML-based downloadable phonebook that could be easily shared and maintained remotely via its built-in web interface. In addition, the WP820 supports importing and exporting of both XML and vCard formats.

For efficient deployment and management, XML phonebook files can be stored on a web server for mobile phone downloads. This allow organizations to have a centralized directory server, and all phones in the organization can periodically synchronize the phonebook from the server.

A sample XML phonebook file is provided at the end of this article. Users can reference the sample XML file to create a phonebook for uploading to the device.

XML PHONEBOOK CONFIGURATION

FIRMWARE

Before using the XML phonebook on WP820, please make sure the firmware on the device is upgrade to the latest version. Please refer to the following link for firmware upgrading information:

https://www.grandstream.com/support/firmware

WEB CONFIGURATION

XML phonebook can be set up on the web UI under Applications->Contacts->Download Contacts. After configuring the above configuration items, click “Save” and then click “Download” to start downloading the phonebook file.

Option

Description

Clear The Old List

If set to “Yes”, the phone will clear the old list before downloading the new file.

Clear Old History Mode

If set to “Clear all”, the phone will delete all previous records before downloading the new records. If set to “Keep Local Contacts”, the newly added local new contacts will not be deleted when downloading new records.

Replace Duplicate Items

Replace Duplicate Entries Mode

Replace Duplicate Entries Mode

If set to “Replace by name”, replace the records of the same name automatically when downloading new records. If set to “Replace by number”, replace the records of the same number automatically when downloading new records.

Download Mode

Selects the file download mode for the download server.

File Encoding

Selects the file encoding for import/export.

Download Server

The URL/IP address of the download server.

HTTP/ HTTPS User Name

The username for the config HTTP/HTTPS server.

HTTP/ HTTPS Password

The password for the config HTTP/HTTPS server.

Automatic Download Interval

The interval at which the phonebook will be downloaded from the download server (in hours).

Table 1: Download contacts web configuration

SETUP VIA PROVISIONING

Users can also use the configuration file to set up the above XML phonebook download option for the phone. In this case, the phone may require a reboot before the configuration takes effect.

The corresponding p values are listed in the table below:

P-Value

Description

Possible Values

P330

Download Mode

0 - No, 1 - YES, HTTP, 2 - YES, TFTP, 3 - Yes, HTTPS. Default is 0

P1435

Clear The Old List

0 - Disabled, 1 - Enabled and 'Clear Old History Mode' is 'Clear all', 2 - Enabled and 'Clear Old History Mode' is 'Keep Local Contacts.' Default is 0.

P1436

Replace Duplicate Items

0 - disabled, 1 – Enabled, replace by name, 2 – Enabled, replace by number

P1681

File Encoding

UTF-8, GBK, UTF-16, UTF-32, Big5, Big5-HKSCS, SHIFT-JIS, ISO8859-1, ISO8859-15, Windows 1251, EUC-KR

P331

Download Server

Set the IP address or domain name of firmware server.

P6713

HTTP/HTTPS Username

Set the user name for the firmware HTTP/HTTPS server.

P6714

HTTP/HTTPS Password

Set the password for the firmware HTTP/HTTPS server.

P332

Automatic Download Interval

0 - None, 5 - 5 min, 30 - 30 min, 60 - 1 Hour, 120 - 2 Hours, 240 - 4 Hours, 360 - 6 Hours, 480 - 8 Hours, 720 - 12 Hours. Default is 0.

Table 2: Download contacts P values

The phone will use the P-value in the config file to set the corresponding the web parameters. It will attempt to download the phonebook XML file specified in the download server path and following the configured interval. If the time interval is set to a non-zero value, the device will check the phonebook periodically.

IMPORT/EXPORT CONTACTS

In addition to downloading phonebook files from a remote server, users can also import or export phonebook files from the web UI. WP820 supports file import and export in two formats: vCard and XML. This function can be found on the web UI under Applications->Contact->Import/Export Contacts:

IMPORT CONTACTS

Option

Description

Clear The Old List

If set to “Yes”, the phone will clear the old list before importing the new file.

Clear Old History Mode

If set to “Clear all”, the phone will delete all previous records before importing the new records. If set to “Keep Local Contacts”, the newly added local new contacts will not be deleted when importing new records.

Replace Duplicate Items

If set to “Yes”, the phone will replace any duplicate items in the phone with the item in the new file.

Replace Duplicate Entries Mode

If set to “Replace by name”, replace the records of the same name automatically when importing new records. If set to “Replace by number”, replace the records of the same number automatically when importing new records.

File Encoding

Selects the file encoding for import.

File Type

Selects the file type for import.

Table 3: Import contact configuration options

After making the desired selections, click “Import local file” and a prompt will display to choose the file to import. Make sure the file to be imported matches the specified file encoding and file type.

EXPORT CONTACTS

Table 4: Export contact configuration options

After making the desired selections, click “Export” and a prompt will display to download the phonebook.

Note:

1. When the imported file exceeds the number of supported contacts (1000), the import will fail and display a corresponding warning prompt.

2. When there is a field that is not supported by WP820 in the imported file, the file can be successfully imported, but the field is not displayed on the phone.

3. The ringtone setting in “Contacts” has a higher priority than the “Group” ringtone setting.

4. Currently, the fields supported by the WP820 address book contacts are:

First name, last name, work phone, home phone, mobile phone, group (does not support export), ringtone (does not support export), outgoing account, address, company, title, department, position. Unsupported field cannot be displayed after the supported fields are imported, but the contacts can still be imported successfully.

XML PHONEBOOK SYNTAX

XML HEADER

In the first line of the XML document, you can set the following headings to XML declarations. It defines the XML version and encoding. For WP820, UTF-8, GBK, UTF-16, UTF-32, Big5, Big5-HKSCS, SHIFT-JIS, ISO8859-1, ISO8859-15 Windows 1251, EUC-KR can be correctly displayed as an encoding method.

Example:

MAIN STRUCTURE OF THE XML PHONEBOOK

Table 5: Main XML hierarchy

Table 6: XML file format

XML PHONEBOOK ELEMENTS

This section describes the details of the XML elements used in the WP820 XML Phonebook file. (Note: Element names are case sensitive.)

ROOT ELEMENT <AddressBook>

<AddressBook> is the root element of an XML document. This element is mandatory.

C:\Users\Administrator\Desktop\xml phonebook 图\未标题-5.jpg

Table 7: <AddressBook> Element

<pbgroup> ELEMENT

Table 8: <pbgroup> Element

<Contact>ELEMENT

C:\Users\Administrator\Desktop\xml phonebook 图\未标题-3.jpg
C:\Users\Administrator\Desktop\xml phonebook 图\未标题-4.jpg

Table 9: <Contact> Element

<Phone>ELEMENT

Table 10: <Phone> Element

XML PHONEBOOK EXAMPLE

<?xml version=”1.0″ encoding=”UTF-8″?>
<AddressBook>
<version>1</version>
<pbgroup>
<id>1</id>
<name>Home</name>
<ringtones/>
</pbgroup>
<pbgroup>
<id>2</id>
<name>Work</name>
<ringtones/>
</pbgroup>
<pbgroup>
<id>3</id>
<name>Friend</name>
<ringtones>/system/media/audio/ringtones/Atria.ogg</ringtones>
</pbgroup>
<Contact>
<FirstName>John</FirstName>
<LastName>Doe</LastName>
<Primary>0</Primary>
<Frequent>0</Frequent>
<Ringtone>/system/media/audio/ringtones/ArgoNavis.ogg</Ringtone>
<Phone type=”Work”>
<phonenumber>8001</phonenumber>
<accountindex>1</accountindex>
</Phone>
<Phone type=”Home”>
<phonenumber>3000001</phonenumber>
<accountindex>0</accountindex>
</Phone>
<Phone type=”Mobile”>
<phonenumber>1234567890</phonenumber>
<accountindex>0</accountindex>
</Phone>
<Mail type=”Home”>JohnDoe@mycompany.com</Mail>
<Group>1</Group>
</Contact>
<Contact>
<FirstName>Michael</FirstName>
<LastName>Tsai</LastName>
<Primary>2</Primary>
<Frequent>0</Frequent>
<Ringtone>/system/media/audio/ringtones/Bell Phone.ogg</Ringtone>
<Phone type=”Work”>
<phonenumber>8002</phonenumber>
<accountindex>1</accountindex>
</Phone>
<Phone type=”Home”>
<phonenumber>3000002</phonenumber>
<accountindex>0</accountindex>
</Phone>
<Phone type=”Mobile”>
<phonenumber>1234567889</phonenumber>
<accountindex>0</accountindex>
</Phone>
<Mail type=”Other”>MichaelTsai@mywebsite.com</Mail>
<Group>2</Group>
</Contact>
<Contact>
<FirstName>Alex</FirstName>
<LastName>Smith</LastName>
<Primary>0</Primary>
<Frequent>1</Frequent>
<Ringtone>/system/media/audio/ringtones/Atria.ogg</Ringtone>
<Phone type=”Work”>
<phonenumber>8003</phonenumber>
<accountindex>0</accountindex>
</Phone>
<Phone type=”Home”>
<phonenumber>3000002</phonenumber>
<accountindex>0</accountindex>
</Phone>
<Phone type=”Mobile”>
<phonenumber>2345678888</phonenumber>
<accountindex>0</accountindex>
</Phone>
<Mail type=”Work”>AlexSmith@myserver.com</Mail>
<Group>3</Group>
</Contact>
</AddressBook>

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment

We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept