[asterisk-users] CDR/MySQL basic config

Adrian Marsh Adrian.Marsh at ubiquisys.com
Mon Aug 6 15:04:07 CDT 2007


Hi,

I'm trying to add mysql CDR onto a vanilla Asterisk 1.2 install.  The
add-ons pack has been installed for a while, so now I'm trying to add
the Mysql config.

I've created a mysql database, added the grants for a user acces, and
can run a mysql -u asteriskcdruser -p and can connect to the database.

I've been using this as a guide:
http://www.757.org/~joat/wiki/index.php/Asterisk#Viewing_CDR_Data_with_A
sterisk:_CDR_Analyzer

I've created cdr_mysql.conf:

[global]
hostname=localhost
dbname=asteriskcdrdb
table=cdr
password=password
user=asteriskcdruser
port=3306
sock=/tmp/mysql.sock
userfield=1

But when I start asterisk (1.4 on my test machine), I get:

  == Parsing '/etc/asterisk/cdr_mysql.conf': Found
[Aug  6 21:01:14] ERROR[32512]: cdr_addon_mysql.c:436 my_load_module:
Failed to connect to mysql database asteriskcdrdb on localhost.
cdr_addon_mysql.so => (MySQL CDR Backend)
[Aug  6 21:01:14] ERROR[32512]: res_config_mysql.c:627 mysql_reconnect:
MySQL RealTime: Failed to connect database server  on  (err 2002). Check
debug for more info.
[Aug  6 21:01:14] WARNING[32512]: res_config_mysql.c:474 load_module:
MySQL RealTime: Couldn't establish connection. Check debug.
[Aug  6 21:01:14] NOTICE[32512]: config.c:1171
ast_config_engine_register: Registered Config Engine mysql
MySQL RealTime driver loaded.
res_config_mysql.so => (MySQL RealTime Configuration Driver)


I'm also looking as to what CDR viewers there are available, and which
people think are best.  I want to view/report on the calls made within
A*k.

Thanks,

Adrian



More information about the asterisk-users mailing list