No CDR written with default installation of FreePBX 15 + Asterisk 16 on Debian 9

Fresh installed FreePBX 15 with Asterisk 16 on Debian 9 using the official wiki guide

Everything smooth during the installation, ODBC connection is fine, but no CDR written neither in MySQL asteriskcdrdb table nor CSV file.

root@pbx:/usr/src# isql -v MySQL-asteriskcdrdb
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select 1
+---------------------+
| 1                   |
+---------------------+
| 1                   |
+---------------------+
SQLRowCount returns 1
1 rows fetched
SQL>


Connected to Asterisk 16.6.1 currently running on pbx (pid = 1424)
pbx*CLI> odbc show asteriskcdrdb

ODBC DSN Settings
-----------------

  Name:   asteriskcdrdb
  DSN:    MySQL-asteriskcdrdb
    Number of active connections: 1 (out of 5)
    Logging: Disabled

pbx*CLI> cdr show status

Call Detail Record (CDR) settings
----------------------------------
  Logging:                    Enabled
  Mode:                       Simple
  Log unanswered calls:       No
  Log congestion:             No

* Registered Backends
  -------------------
    csv
    cdr_manager (suspended)
    Adaptive ODBC


root@pbx:~# cd /var/log/asterisk/cdr-csv/
root@pbx:/var/log/asterisk/cdr-csv# ll
total 8.0K
drwxrwxr-x 2 asterisk asterisk 4.0K Nov  4 10:47 .
drwxrwxr-x 5 asterisk asterisk 4.0K Nov  4 11:53 ..
root@pbx:/var/log/asterisk/cdr-csv# ls -l
total 0

CDR’s work fine on Debian 9 and Debian 10 using the following:

# Install MariaDB ODBC Connector
cd /usr/src
git clone https://github.com/MariaDB/mariadb-connector-odbc.git
cd mariadb-connector-odbc
git checkout tags/3.1.4
mkdir build
cd build
cmake ../ -LH -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_SSL=OPENSSL -DDM_DIR=/usr/lib/arm-linux-gnueabihf -DCMAKE_C_FLAGS_RELEASE:STRING="-w"
cmake --build . --config Release
make install

# Configure ODBC
cat <<EOF > /etc/odbcinst.ini
[MySQL]
Description = ODBC for MySQL (MariaDB)
Driver = /usr/local/lib/libmaodbc.so
FileUsage = 1
EOF

cat <<EOF > /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
EOF

@reraikes

Thanks for replying.

Actually there is no difference between yours and my conf, except the installation way of MariaDB ODBC Connector, you compile it from source and I just download and install the binary version, I also tried to check with ldd command, everything fine.

I believe the issue not caused by ODBC connection itself, but I have no idea why no cdr being written.

Thanks anyway.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.