1

According to this link "https://wiki.asterisk.org/wiki/display/AST/Asterisk+Internal+Database", Asterisk was using Berkeley Database as its internal database up to version 1.8 and from version 10 it has switched to SQLite.

As there are some functions to work with asterisk internal database (such as DB, DB_DELETE, DB_EXISTS, DB_KEYS) in the dial plan, and most of them get a key as input argument, I want to know if this functions are working on Asterisk systems with version numbers above 10? Are they working with their relational database (SQLite) too?

Thanks in advance

T.Sh
  • 390
  • 2
  • 16

1 Answers1

0

Thoose functions working, with INTERNAL database(fixed file) only.

If you need use external source(sqlite,mssql,access, anything) you have use UnixODBC connector and func_odbc with pure sql

https://www.voip-info.org/wiki/view/Asterisk+func+func_odbc

arheops
  • 15,544
  • 1
  • 21
  • 27
  • Thanks @arheops. But what if the Internal Database is SQLite (Versions upper than 1.8)? – T.Sh Oct 27 '17 at 10:44
  • Internal db choosed at configure time if i not mistake. Yes, it is sqlite, but it is fixed file. – arheops Oct 27 '17 at 22:14
  • Func_odbc is much more flexible. Internal db is mostly for compatibility. – arheops Oct 27 '17 at 22:14
  • Thanks @arheops. I think it's useful to mention that the directory of Asterisk internal database is /var/lib/asterisk and the file is named "astddb" which is in sqlite for versions upper than 10. If you open that file with SQLiteBrowser, there is just a table with two fields; a key and a value with varchar(256) datatype. I think that it's the reason we can use the above functions with upper versions too :) – T.Sh Oct 28 '17 at 07:13
  • It have no reason use that functions. simple mysql install perform faster and allow much more complex queries via unixodbc. db function in asterisk have no locks, racing condition not checked etc etc. – arheops Oct 28 '17 at 10:09