SOLVED XML Phonebook

We've decided to include the XML phonebook in our provisioning of our GXP2130 and 60 phones. FusionPBX doesn't come with the files to support that, so here's a basic one we made that works with extensions, first and last names, and contact photos. Create a file called "phonebook.xml" in each grandstream provisioning profile folder of the profiles you use, and insert the contents below. One could modify this even more so it takes advantage of the <accountindex> tag and assign contacts to the respective extension when multiple extensions are configured on the phone.

<?xml version="1.0" encoding="UTF-8"?>
{foreach $contacts as $contact}


Last edited:
I would think it's possible... While we do have contacts in our Contacts app in FusionPBX, but they don't show up in our contact provisioning. They're not very important to us, so I haven't researched to see what's needed to include them.
Hmm... Good question! I don't remember how I found that one in particular. It was probably from some other phonebook provisioning file that came with FusionPBX, or I made some temporary edits to the respective PHP file(s) that would tell me everything about the $contacts variable.

PHP help is outside of the scope of this forum, but here's two tips to get you started: 1) Using print_r(<var>, true) and file_put_contents() is a simple method of telling you about the variable that won't affect the output of the provisioning file. 2) Just from a quick glance, it looks like <fpbx dir>/app/provision/index.php or <fpbx dir>/app/provision/resources/classes/provision.php would be the files to look at if you're wanting to go with the temporary PHP file edits.

Best of luck to you! Make sure to share your finding here so others can benefit, too.
Great detailed reply! I was under the impression that you were using the FPbx contacts app. So where are you getting the contacts data from?

I saw a Cisco system that has an internal directory on the phones, I think that is what I am trying to accomplish.

We're just generating it from the extensions on the system. To do so, in Default Settings set "contact_extensions" (in the Provision section) to true to use the local extensions.
Ok, in my lab, I have a GXP2130, so created the file as you specified, but it doesn't seem to add the phonebook to the phone. Do I have to enable something somewhere else? I even changed the lua file to resync like in your other post and changed the contact_extensions. Thx.

Do I have to turn something on in the GXP2130? I see fields for Phonebook server, etc.
Last edited: