/usr/share/kamailio/mysql/acc-create.sql is in kamailio-mysql-modules 5.1.2-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | CREATE TABLE `acc` (
`id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
`method` VARCHAR(16) DEFAULT '' NOT NULL,
`from_tag` VARCHAR(64) DEFAULT '' NOT NULL,
`to_tag` VARCHAR(64) DEFAULT '' NOT NULL,
`callid` VARCHAR(255) DEFAULT '' NOT NULL,
`sip_code` VARCHAR(3) DEFAULT '' NOT NULL,
`sip_reason` VARCHAR(128) DEFAULT '' NOT NULL,
`time` DATETIME NOT NULL
);
CREATE INDEX callid_idx ON acc (`callid`);
INSERT INTO version (table_name, table_version) values ('acc','5');
CREATE TABLE `acc_cdrs` (
`id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
`start_time` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL,
`end_time` DATETIME DEFAULT '2000-01-01 00:00:00' NOT NULL,
`duration` FLOAT(10,3) DEFAULT 0 NOT NULL
);
CREATE INDEX start_time_idx ON acc_cdrs (`start_time`);
INSERT INTO version (table_name, table_version) values ('acc_cdrs','2');
CREATE TABLE `missed_calls` (
`id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
`method` VARCHAR(16) DEFAULT '' NOT NULL,
`from_tag` VARCHAR(64) DEFAULT '' NOT NULL,
`to_tag` VARCHAR(64) DEFAULT '' NOT NULL,
`callid` VARCHAR(255) DEFAULT '' NOT NULL,
`sip_code` VARCHAR(3) DEFAULT '' NOT NULL,
`sip_reason` VARCHAR(128) DEFAULT '' NOT NULL,
`time` DATETIME NOT NULL
);
CREATE INDEX callid_idx ON missed_calls (`callid`);
INSERT INTO version (table_name, table_version) values ('missed_calls','4');
|