Hello !
Using Asterisk 18.2, my goal is to : cdr → odbc → unixodbc → mariadb
When using cdr_adaptive_odbc
, it is working great, not error, data are inserted into database.
Since I have no other data to store in db than the default ones, using cdr_adaptive_odbc
should be equivalent to cdr_odbc
, but it is not. Using cdr_odbc
I get :
[Jan 24 18:28:13] WARNING[149]: cdr_odbc.c:159 execute_cb: cdr_odbc: Error in ExecDirect: -1, query is: INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield,peeraccount,linkedid,sequence) VALUES ({ts '2022-01-24 18:28:11'},?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
[Jan 24 18:28:13] ERROR[149]: cdr_odbc.c:188 odbc_log: CDR direct execute failed
How come ? What can produce that ?
cdr_odbc.conf :
[global]
dsn=asterisk
loguniqueid=yes
dispositionstring=yes
table=cdr
usegmtime=no
hrtime=yes
newcdrcolumns=yes
res_odbc.conf :
[asterisk]
dsn => asterisk-odbc
username => asterisk
password => xXxXxXxXxXxXx
pre-connect => yes
sanitysql => select 1
connect_timeout => 5
logging => yes
Thanks in advance,
Michel