Does any one have a way of accessing the Phone book. I want to be able to have dynamic updates to it from an external database, however I do not know how to access the one in FreePBX. I know it is a Berkely DB but cannot find it or see an external way to access it.
The phone book module. It’s records are stored in a berkely db. But I cannot find any way to connect. Was thinking of doing an ODBC connection just as I do now to the mysql database.
I’ve not played with that one for the same reason. The code for it is located at /var/lib/asterisk/agi-bin/pbdirectory. it is very close to the code for /var/lib/asterisk/agi-bin/directory which I’ve made changes to to integrate multiple boxes together into one unified phone/employee directory. but yet different enough that I know my changes will not work as it’s doing a DB connection.
Asterisk uses berkely db v1 (which is very, very old) as it’s internal database, and it’s not designed for concurrent access. Sqlite would have been a MUCH better choice (fwiw, callweaver has already replaced it with sqlite). So the unfortunate answer is there is no really easy way to get at the database.
The only way to update it externally is to use asterisk manager interface, which incidentally is what freepbx does. There’s a PHP class called asteriskmanager which is what we use to do it - I’d suggest you start there.
R_Henry,
creating an external layer to update the phone book through the manager is not a difficult thing. If you have a business need for it and are not strong with php you can also consider contracting to have it done. unless you have some elaborate requirement it would probably not be a significant cost.
Philippe Lindheimer - FreePBX Project Lead
http//freepbx.org - IRC #freepbx