What Database Should I Use, For Simple Data Storing? SQLite Or The Buitin One?

Home » Asterisk Users » What Database Should I Use, For Simple Data Storing? SQLite Or The Buitin One?
Asterisk Users 3 Comments

I was studying about how to use databases in Asterisk, accessing it from the dial plan. In my project, my dial plan will have to store simple data (ex: IP number, port number, device name, etc) in a persistent way, so that it will be possible to retrieve such information in future moments, still via dial plan.

For this case, I would like to know?

  1. What is the best choice for storing and retrieving simple data , with dial plan instructions: SQLite or the builtin database option? Consider that I’m worried about installation, configuration and use difficulties.
  2. Does Asterisk 13 come with SQLite ready for use or have I to install this database separately and configure it to be accessible in dial plan?
  3. Where can I find tutorials about using SQLite or the builtin database for storing simple that?

P.S.: I’m not interested in storing CDR data.

Any hint will be very helpful!

3 thoughts on - What Database Should I Use, For Simple Data Storing? SQLite Or The Buitin One?

  • Propose U to use Mysql

    2015-07-07 17:26 GMT+03:00 Rodrigo Pimenta Carvalho :

  • To some extent the answer depends on how you want to use it overall, and what you already have installed.

    We did something similar on a project where we created a simple app accessible via AGI, and it stored/retrieved data to/from anXML file. If your access frequency is low enough that might be a good solution. On the other hand if you need complex query capability you should stay on the SQL side.

    If you already have MySQL installed for other Asterisk features (eg:
    CDR, or if you use FreePBX) then you might as well use that.

  • I believe that Asterisk 1.8 and older uses the BerkeleyDB for Asterisk’s internal database (AKA the Astdb) and in newer versions use SQLite. However, the basic functionality is the same. Whether you use the Astdb or MySQL
    really depends on what you want to do with it. The AstDB is not a relational database like MySQL, it simply a key/value store. If you can get away with that, and you need simplicity, then the AstDB is the way to go. If you need MySQL you’ll probably end up having to write AGI scripts to access it. Like I said, it all depends on what your needs are. Regards;
    John

    —–Original Message—