Hello! Installed asterisk 19 and freepbx 16. All is ok but CDR not writing to database ( astersickcdrdb-cdr is empty ). Csv file Master.csv writing correct, FreePBX write to asterisk DB correct. Only cdr not working.
cat /etc/odbcinst.ini
[MySQL]
Description = ODBC for MySQL (MariaDB)
Driver = /usr/lib/libmaodbc.so
FileUsage = 1
cat /etc/odbc.ini
[MySQL-asteriskcdrdb]
Description=MySQL connection to 'asteriskcdrdb' database
driver=MySQL
server=localhost
database=asteriskcdrdb
Port=3306
Socket=/var/run/mysqld/mysqld.sock
option=3
Charset=utf8
odbc show all
ODBC DSN Settings
-----------------
Name: asteriskcdrdb
DSN: MySQL-asteriskcdrdb
Last fail connection attempt: 2022-10-07 05:37:24
Number of active connections: 0 (out of 5)
Logging: Disabled
cdr show status
Call Detail Record (CDR) settings
----------------------------------
Logging: Enabled
Mode: Simple
Log calls by default: Yes
Log unanswered calls: Yes
Log congestion: No
* Registered Backends
-------------------
cdr_manager (suspended)
csv
Adaptive ODBC
cat /etc/asterisk/res_odbc_additional.conf
[asteriskcdrdb]
enabled=>yes
dsn=>MySQL-asteriskcdrdb
pre-connect=>yes
max_connections=>5
username=>freepbxuser
password=>64b4f857ca7929100667adc41e719391
database=>asteriskcdrdb
Then i try… but file exist.
isql -v "MySQL-asteriskcdrdb"
[01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/libmaodbc.so' : file not found
[ISQL]ERROR: Could not SQLConnect
Fix it by install apt install libmariadb3 libmariadb-dev
isql -v "MySQL-asteriskcdrdb"
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
Reboot now and it’s working! Thanks!!!