Easy question = What is the name and location of the Astrisk phone book

Would like to be able to download the phonebook so that I can put it into another system in real time (or at least batch) do not want to have to do an export all the time.

Can anyone help? Just need that name and location of the Astrick phone book,

I believe the phonebook is in the AstDB (database). You would need run a query command to output the data or connect to the database directly with a read account.

1 Like

Thanks! That actually does help me. Guess I will have to do it by export / import.

Greg

Be informed that that post is 13 years old and no longer applicable, Asterisk moved to sqlite3 more than 4 years ago, also there are more than one “phone book” available in the FreePBX GUI, you will have to be explicit as to which one you are referring to, to my knowledge they will be using the tables in the sql database “asterisk” which is either written by mysql or mariadb to /var/lib/mysql/asterisk/* depending on your version and not astdb.sqlite3 in /var/lib/asterisk.

dicko is right. I am using the Asterisk Phonebook module in the Admin section of FreePBX 13 GUI. When writing custom context checks in the dial plan, I am using DB_Exists/Result to successfully query data, meaning that phonebook looks like it is being stored in AstDB.

Here is a more up to date link:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Internal+Database

Sorry yes you are right, looking for the speed dial phone book. ie the customer names and phone numbers.

There are two astdb tables involved in system speeddials

rasterisk -x ‘database show sysspeeddials’

and

rasterisk -x ‘database show cidname’

You will need a sqlite3 valid sql ‘query’ that ‘joins’ the ‘value’ of sysspeeddials/(thenumber) to cidname/(thenumber)'s value

There is an easier import/export pair of tabs on the gui page though.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.