Hi,
I’ve update Asterisk to the last release (1.8.15.0-rc1) but now I have a problem with cdr: doesn’t works!
My Data base is Mariadb 5.5.25 and I use odbc.
These are my configuration files (OS: ubuntu 12.04 x64 LTS):
/etc/odbcinst.ini :
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1
/etc/odbc.ini :
[asteriskrubrica]
Description = MySQL connection to ‘asterisk’ database
Driver = MySQL
Database = AsteriskRubrica
User = user1
Password = password1
Server = localhost
Port = 3306
Socket = /var/run/mysqld/mysqld.sock
[asteriskcdr]
Description = MySQL connection to ‘asterisk’ database
Driver = MySQL
User = user2
Password = password2
Database = asteriskcdrdb
Server = localhost
Port = 3306
Socket = /var/run/mysqld/mysqld.sock
/etc/asterisk/res_odbc.conf :
[asteriskrescdr]
enabled => yes
dsn => asteriskcdr
username => user2
password => password2
pooling => no
limit => 500
pre-connect => yes
backslash_is_escape => yes
[asteriskresrubrica]
enabled => yes
dsn => asteriskrubrica
username => user1
password => password1
pooling => no
limit => 500
pre-connect => yes
/etc/asterisk/cdr_odbc.conf :
[global]
dsn=asteriskrescdr
loguniqueid=yes
dispositionstring=yes
table=cdr ;“cdr” is default table name
;usegmtime=no ; set to “yes” to log in GMT
;hrtime=yes ;Enables microsecond accuracy with the billsec and duration fields
/etc/asterisk/modules.conf :
[modules]
autoload=yes
preload => res_odbc.so
preload => res_config_odbc.so
load => res_musiconhold.so
noload => pbx_gtkconsole.so
noload => chan_console.so
noload => chan_alsa.so
noload => cdr_csv.so
noload => cdr_custom.so
noload => cdr_adaptive_odbc.so
noload => res_pktccops.so
noload => chan_mgcp.so
noload => cdr_mysql.so
DSN asterisrubrica works very well!
the “odbc show” command cli returns:
ODBC DSN Settings
Name: asteriskrescdr
DSN: asteriskcdr
Last connection attempt: 1970-01-01 01:00:00
Pooled: No
Connected: Yes
Name: asteriskresrubrica
DSN: asteriskrubrica
Last connection attempt: 1970-01-01 01:00:00
Pooled: No
Connected: Yes
The problem is CDR. When Asterisk tries to save the record into the cd the I have this log:
WARNING[10942]: res_odbc.c:609 ast_odbc_direct_execute: SQL Execute error! Verifying connection to asteriskrescdr [asteriskcdr]…
> cdr_odbc: Error in ExecDirect: -1
ERROR[10942]: cdr_odbc.c:162 odbc_log: CDR direct execute failed
User1 has the permission to do anything in the table cdr of Mariadb.
How can I solve the problem?
Thanks a lot tot…