Last active
August 29, 2015 14:23
-
-
Save achyutdev/dd5c16dfa11bf2695f7d to your computer and use it in GitHub Desktop.
cdr sql syntax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 '', | |
`lastapp` VARCHAR(200) NOT NULL DEFAULT '', | |
`lastdata` VARCHAR(200) NOT NULL DEFAULT '', | |
`duration` FLOAT UNSIGNED NULL DEFAULT NULL, | |
`billsec` FLOAT UNSIGNED NULL DEFAULT NULL, | |
`disposition` ENUM('ANSWERED','BUSY','FAILED','NO ANSWER','CONGESTION') NULL DEFAULT NULL, | |
`channel` VARCHAR(50) NULL DEFAULT NULL, | |
`dstchannel` VARCHAR(50) NULL DEFAULT NULL, | |
`amaflags` VARCHAR(50) NULL DEFAULT NULL, | |
`accountcode` VARCHAR(20) NULL DEFAULT NULL, | |
`uniqueid` VARCHAR(32) NOT NULL DEFAULT '', | |
`userfield` FLOAT UNSIGNED NULL DEFAULT NULL, | |
`answer` DATETIME NOT NULL, | |
`end` DATETIME NOT NULL, | |
PRIMARY KEY (`id`), | |
INDEX `calldate` (`calldate`), | |
INDEX `dst` (`dst`), | |
INDEX `src` (`src`), | |
INDEX `dcontext` (`dcontext`), | |
INDEX `clid` (`clid`) | |
) | |
COLLATE='utf8_bin' | |
ENGINE=InnoDB; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment