i already created the database and tables and grant all insert priviledges to asteriskcdruser.
But i am getting the error below.
Connected to Asterisk 1.4.33.1 currently running on Astertest (pid = 2620)
Verbosity is at least 3
AstertestCLI> cdr mysql status
Not currently connected to a MySQL server.
AstertestCLI>
Is it possible for me to dump the cdr on a separate database? not on local host? If so, do you have the procedure?
AstertestCLI> module unload cdr_addon_mysql.so
== Unregistered ‘mysql’ CDR backend
AstertestCLI> module load cdr
cdr_csv.so cdr_custom.so cdr_manager.so cdr_odbc.so
cdr_addon_mysql.so
AstertestCLI> module load cdr_addon_mysql.so
== Parsing ‘/etc/asterisk/cdr_mysql.conf’: Found
Loaded cdr_addon_mysql.so => (MySQL CDR Backend)
AstertestCLI> cdr mysql status
Connected to asterisk@localhost, port 3306 using table cdr for 12 seconds.
Wrote 0 records since last restart.
Astertest*CLI>
In cdr_mysql.conf change the hostname of the machine that holds the database.
[global]
hostname=hostname_of_db_computer
dbname=asteriskcdrdb
password=password
user=asteriskcdruser
port=3306
sock=/var/lib/mysql/mysql.sock
That should do it!