[HELP] Asterisk database extensions query

Hi everyone,
I recentry installed a Asterisk PBX 13, and I see that it now uses sqlite as the database engine.
Previously I worked with Elastix and could make queries of the extensions and their passwords, I’m a little lost, because I can not make the same queries in version 13.

[root@centos]# sqlite3 /var/lib/asterisk/astdb.sqlite3
SQLite version 3.6.20
Enter “.help” for instructions
Enter SQL statements terminated with a ";“
sqlite> .databases
seq name file
”— --------------- ----------------------------------------------------------
0 main /var/lib/asterisk/astdb.sqlite3
sqlite> .tables
astdb
sqlite>
sqlite> select * from astdb
…> ;
/pbx/UUID|611efa12-f8f1-4ce5-9bb4-cd2c637a7e70
/dundi/secret|4E5zJJ9hBVG5X6pGBhBmXw==;f9oHdispUDQ6+Q9rPFDMBg==
/dundi/secretexpiry|1505482655
/SIP/Registry/6002|xx:6002:sip:6002@xx:59134;rinstance=c885a63fe61964c7;transport=UDP
sqlite>
sqlite>
sqlite>

this is the only i can get.

Thanks in advance.

The sqlite database you refer to is strictly for storing persistent state information about Asterisk internals. It is not traditionally used for configuration. Asterisk standalone only uses a database if you configure it to do so yourself. Otherwise it uses .conf text files to configure everything. The database in Elastix you are talking of was part of their software, not Asterisk.

2 Likes

Hi jcolp,
I appreciate your help