Grandstream - directory request

From MiRTA PBX documentation
Revision as of 20:04, 2 September 2021 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

On the phone template, add the entry to download the directory:

# Phonebook XML Server Path
# This is a string of up to 256 characters that should contain a path to the XML file. It MUST be in the host/path format.
# For example: directory.grandstream.com/engineering
# String
<P331>{$server_host}/pbx/autoprovision/{$provisioning_password}/{$mac}-directory.xml</P331>
# Phonebook Download Interval (in minutes)
# Valid value range is 5-720. Default is 0 for disabled
# Number: 0, 5-720; 
<P332>720</P332>
# Remove Manually-edited entries on Download. Possible values: 0 (No) / 1 (Yes); other values
# are ignored. The default value is 1.
<P333>1</P333>
# Enable remote download of phonebook. Possible values: 1 (HTTP) / 2 (TFTP)/ 3 (HTTPS); other
# values are ignored. The default value is 0
<P330>1</P330>

Use this template for the directory request

<?xml version="1.0" encoding="utf-8"?>
<AddressBook>
{item_loop}
	<Contact>
		<id>1</id>
		<FirstName>{$NAME}</FirstName>
		<Frequent>0</Frequent>
		<Phone type="Work">
			<phonenumber>{$PHONE1}</phonenumber>
			<accountindex>1</accountindex>
		</Phone>
	<Group>3</Group>
		<Primary>0</Primary>
	</Contact>
{/item_loop}
</AddressBook>