Scraping the phonebook from FreePBX

Dear all,

We have three Asterisk / FreePBX installations across three branch offices and I would like to maintain (or rather, maintain as little as possible) a web based directory that draws its contents from these three servers. The problem is simple - new staff come and go and it becomes too much of an admin headache to maintain a current list of numbers.

Is it possible to scrape the contents of the FreePBX phone books? Is there an api for this?

Any and all help gratefully appreciated,


Please provide a bit more details. To start which directory. The Phonebook directory or the Directory? Next how are the office systems connected, can you ssh from one to the other for example?

I have modified the code of the directory service (This is the one that uses the voicemail.conf file) to have and maintain a unified voicemail directory across multiple offices.

Thanks fskrotzki,

I’m not sure if directory is the correct word at all - what I want to pull out of FreePBX is the user/extension list. We have experimented a great deal with the phonebook feature of FreePBX, but it not only needs to updated in addition to the actual user list, but it also fails to work with our handsets (buffer size issues on Grandstream GXP 2000s). What I want to be able to do is add/delete a user and have the change reproduced immediately on a web accessible list.

Apologies for the lack of detail concerning our setup; our three PBXs are connected via VPNs. Ssh between the three is no problem. We are running a 2.3, 2.4 and a 2.5 installation, although there are plans to normalise these (although we have not set any dates; everything so far is working fine as it is).