Hi,
I’m using Asterisk 11.25.1
on a server running on CentOs 6.9
.
I’ve configured Asterisk to store calls in a mysql database using unixODBC. The problem is that Asterisk store some calls and miss others!
For example if i recieve 300 calls, it only store 160!
From time to time, in the CLI, i get this error : cdr_odbc.c:163 odbc_log: Unable to retrieve database handle. CDR failed.
My configuration files :
odbc.ini
[asterisk-connector]
Description = MySQL connection to ‘asterisk’ database
Driver = MySQL
Server = localhost
Database = asterisk
User = asterisk
Password = asterisk
Port = 3306
Option = 3
Socket = /var/lib/mysql/mysql.sock
Trace = On
TraceFile = /var/log/odbc.log
odbcinst.ini
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/libmyodbc5.so
Setup = /usr/lib/libodbcmyS.so
Driver64 = /usr/lib64/libmyodbc5w.so
Setup64 = /usr/lib64/libodbcmyS.so
FileUsage = 1
Pooling = Yes
CPTimeout = 120
res_odbc.conf
[asterisk]
enabled => yes
dsn => asterisk-connector
pre-connect => yes
pooling => yes
limit => 100
cdr_adaptive_odbc.conf
[asterisk]
connection=asterisk
table=cdr
alias start=calldate
cdr_odbc.conf
[global]
dsn =asterisk-connector
dispositionstring =yes
table =cdr
usegmtime =no
hrtime =yes
newcdrcolumns =yes
loguniqueid =yes
I hope that you can help me with this. Thank you.