Hy!
My problem is, that i can’t store my cdr into mysql. I’v installed asterisk addons and cgange file cdr_myql.conf.
In the next section i will write configuration of my files.
[color=red]cdr.mysql.conf[/color]
[global]
hostname=10.1.1.254
dbname=asterisk
table=cdr
password=centos
user=asterisk
port=3306
sock=/var/lib/mysql/mysql.sock
userfield=1
[color=red]Line that i put in mysql[/color]
CREATE DATABASE asterisk;
GRANT INSERT
ON asterisk.*
TO asterisk@localhost
IDENTIFIED BY ‘centos’;
USE asterisk;
CREATE TABLE cdr
(
calldate
datetime NOT NULL default ‘0000-00-00 00:00:00’,
clid
varchar(80) NOT NULL default ‘’,
src
varchar(80) NOT NULL default ‘’,
dst
varchar(80) NOT NULL default ‘’,
dcontext
varchar(80) NOT NULL default ‘’,
channel
varchar(80) NOT NULL default ‘’,
dstchannel
varchar(80) NOT NULL default ‘’,
lastapp
varchar(80) NOT NULL default ‘’,
lastdata
varchar(80) NOT NULL default ‘’,
duration
int(11) NOT NULL default ‘0’,
billsec
int(11) NOT NULL default ‘0’,
disposition
varchar(45) NOT NULL default ‘’,
amaflags
int(11) NOT NULL default ‘0’,
accountcode
varchar(20) NOT NULL default ‘’,
userfield
varchar(255) NOT NULL default ‘’
);
ALTER TABLE cdr
ADD uniqueid
VARCHAR(32) NOT NULL default ‘’;
ALTER TABLE cdr
ADD INDEX ( calldate
);
ALTER TABLE cdr
ADD INDEX ( dst
);
ALTER TABLE cdr
ADD INDEX ( accountcode
);
And i cant see any record into database.
Please, can someone give me the way hot to do it!
Best regards!