Phonebook via Active directory

Hi,

I’ve got a script which creates a grandstream phonebook by enterting the asterisk users database and select the extension and name from it to create that phonebook.
By putting it in a cronjob, the phonebook updates every 12hours.

Now I was wondering if it’s possible to create/alter a script so that I can select the name and number from active directory to create the phonebook instead of getting it from the asterisk users database.

Any help would be much appreciated

Regards

ps: if this has already been asked before, I’m sorry but I didn’t find it.

Did you ever figure this out? I’m interested in something like this as well.