Adding mediation tables, modified cdrs_primary to include source host of the CDR

This commit is contained in:
DanB
2013-05-23 14:23:52 +02:00
parent e3154f5824
commit 147aef6dc5
2 changed files with 15 additions and 2 deletions

View File

@@ -1,11 +1,12 @@
--
-- Table structure for table `cdrs_primary`
--
DROP TABLE IF EXISTS `cdrs_primary`;
CREATE TABLE `cdrs_primary` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cgrid` char(40) NOT NULL,
`accid` varchar(64) NOT NULL,
`cdrhost` varchar(64) NOT NULL,
`reqtype` varchar(24) NOT NULL,
`direction` enum('0','1','2') NOT NULL DEFAULT '1',
`tenant` varchar(64) NOT NULL,
`tor` varchar(8) NOT NULL,
@@ -21,7 +22,6 @@ CREATE TABLE `cdrs_primary` (
--
-- Table structure for table cdrs_extra
--
DROP TABLE IF EXISTS `cdrs_extra`;
CREATE TABLE `cdrs_extra` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cgrid` char(40) NOT NULL,

View File

@@ -0,0 +1,13 @@
--
-- Table structure for table `rater_cdrs`
--
CREATE TABLE `rated_cdrs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cgrid` char(40) NOT NULL,
`cost` double(20,4) default NULL,
`cgrcostid` int(11) NOT NULL,
`cdrsrc` char(64) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `cgrid` (`cgrid`)
);