Таблица CDR
CREATE TABLE `cdr` (
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`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 '',
`uniqueid` VARCHAR(32) NOT NULL DEFAULT '',
`peeraccount` VARCHAR(20) NOT NULL DEFAULT '',
`linkedid` VARCHAR(32) NOT NULL DEFAULT '',
`sequence` INT(11) NOT NULL DEFAULT '0',
`userfield` VARCHAR(255) NOT NULL DEFAULT '',
`data` BLOB,
`way` TINYINT(4) NOT NULL DEFAULT '0',
`phn` INT(11) DEFAULT NULL,
`active` TINYINT(4) NOT NULL DEFAULT '0',
`tmp_val` VARCHAR(255) DEFAULT NULL,
`rec_path` VARCHAR(255) DEFAULT NULL,
`start` VARCHAR(255) DEFAULT NULL,
`end` VARCHAR(255) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `calldate` (`calldate`),
KEY `accountcode` (`accountcode`),
KEY `uniqueid` (`uniqueid`),
KEY `dst` (`dst`),
KEY `src` (`src`)
) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8