[asterisk-users] Asterisk 1.8.13.0 / problem with cdr logging (mysql, odbc)

Thorsten Göllner tg at ovm-group.com
Tue Jun 19 03:38:42 CDT 2012


Am 18.06.2012 21:49, schrieb James Sharp:
> On 6/18/2012 11:52 AM, Thorsten Göllner wrote:
>> 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?
>>
>
> *SNIP*
>
>> 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?
>
> The DSN that you specify in cdr_odbc.con should be the DSN you 
> configured in res_odbc.conf, in this case "mysql" versus 
> "MySQL-asterisk".
>
> I beat head against the desk for hours because of this same issue.
>
This solved the problem. The CDR is written to the mysql database. 
Thanks. It would never have occurred to me.

BUT the cli command "odbc show all" still shows and "uninitialized" last 
connection attempt. Never mind?

CLI> odbc show all

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

   Name:   mysql
   DSN:    MySQL-asterisk
     Last connection attempt: 1970-01-01 01:00:00
   Pooled: No
   Connected: Yes




More information about the asterisk-users mailing list