How to retrieve and save Asterisk phonebook entries via ARI?

0

How can I retrieve/update/add Asterisk phonebook entries via ARI? I'm looking at ARI documentation https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ARI, but I don't find anything about the phonebook...

The phonebook I'm talking about is the one I find in FreePBX Administration > Admin > Asterisk Phonebook.

I also tried to look for the phonebook entries in the MySQL database, but don't see them there either...

TheStoryCoder

Posted 2018-05-09T09:09:07.697

Reputation: 111

Answers

0

Asterisk itself is PBX and not store nor manage phonebooks or phonebooks entries. It have no API for that.

If you have FreePBX framework(Elastic < 5.0, Trixbox), it store phonebook in astdb. So it is accessable via AMI by checking DB/DB_GET functions. ARI may have similar function, check ARI doc.

For any other framework you should refer to framework documentation.

arheops

Posted 2018-05-09T09:09:07.697

Reputation: 977

Thanks for clarifying. We do use FreePBX (14.0.2.10). So the question is if ARI can access that astdb... – TheStoryCoder – 2018-05-09T12:01:06.033

Oh, is astdb just an SQLite database? The one located at /var/lib/asterisk/astdb.sqlite3? – TheStoryCoder – 2018-05-09T14:20:54.487

Depend of version AND compilation options. For 1.4 it is just text file. – arheops – 2018-05-10T06:49:40.790