[asterisk-users] Asterisk 1.8.13.0 / problem with cdr logging (mysql, odbc)
Thorsten Göllner
tg at ovm-group.com
Mon Jun 18 10:52:15 CDT 2012
Hi,
I am trying now for over 4 hours setting up cdr-logging via odbc into a
mysql database. But with no success. Do you have any hint for me?
cat /etc/odbc.ini
------------------
[MySQL-asterisk]
Description = MySQL ODBC Driver
Driver = MySQL
Socket = /var/run/mysqld/mysqld.sock
Server = localhost
User = xxx
Password = xxx
Database = asterisk
Option = 3
Port =
and
/etc/odbcinst.ini
--------------------
[MySQL]
Description = MySQL ODBC MyODBC Driver
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
FileUsage = 1
When testing this setup I can see, that this basic setup ist fine:
~$ isql MySQL-asterisk asterisk qpalym -v
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
So here are the config file for asterisk.
/etc/asterisk/res_odbc.conf
-----------------------------
[mysql]
enabled => yes
dsn => MySQL-asterisk
username => asterisk
password => qpalym
pre-connect => yes
and
/etc/asterisk/cdr_odbc.conf
----------------------------
[global]
dsn=MySQL-asterisk
loguniqueid=yes
dispositionstring=yes
table=cdr
But after a call hangup I get the following error:
cdr_odbc.c: Unable to retrieve database handle. CDR failed.
What is going wrong here, please?
-Thorsten-
More information about the asterisk-users
mailing list