Aterisk or other phonebook to Grandstream contact or phonebook?


Is there a way to utilize the directory / asterisk phone book on a Grandstream GXP2170?
Didnt have success looking on google or here, I could have of course searched for the wrong keywords.


I wrote this for someone in the community last year. I never got much feedback on how well it worked or not.

If you browse the other folders of that github, I have other examples pulling from Contact Manager, and such. but this is the only one I have creating the Grandstream compatible format.

1 Like


Thanks for sharing!

I can test this on my inhouse server.
In looking at this and the post you refer to, is this all thats needed or is there other code?
I created a directory based on the previous scripts docs, are there some instructions I should be following?
My guess is I dont need their directory structure, just a way to reference the URL from the phone?
Also, do I need to lead off with PHP then path since it needs to be executed?


I tested out the following.
Folder made pbook ( /var/www/html/pbook)
Owned by asterisk:asterisk

Named the script gs.php ( execute on command line XML works correctly )
Chmod 755 gs.php

From web browser went to:
xml results do show up ( must be https or you get nothing )

In EPM, customized firmware basefile
Enabled P330=3

Not sure where to place the URL for the phone to grab the xml?
Tried this with no luck.

Go into a phone and put it in manually.
Make sure it works.
Export the config and look for changes.
Edit those bits in the EPM basefile settings.

I did try that got an error on XML upload manually ( to test format ) then through Grandstream’s doc

gxp_wp_xml_phonebook.pdf (

I took their sample config and got the same error on attempted upload.
Opened a case with grandstream…

The format does look correct coming from the script!

I will write full documentation on how to implement so you can add it back to your script when I’m done.