From 274ce675721c67df097e65ecba76a522fdd54d37 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Mon, 13 Oct 2003 18:18:15 +0000 Subject: Add contributed postgreSQL schema for CDR (bug #381) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1628 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- postgres_cdr.sql | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 postgres_cdr.sql (limited to 'postgres_cdr.sql') diff --git a/postgres_cdr.sql b/postgres_cdr.sql new file mode 100755 index 000000000..3db3fc037 --- /dev/null +++ b/postgres_cdr.sql @@ -0,0 +1,32 @@ + +/* + * Id: postgres_cdr.sql,v 1.8.2.11 2003/10/10 11:15:43 pnixon Exp $ + * + * --- Peter Nixon [ codemonkey@peternixon.net ] + * + * This is a PostgreSQL schema for doing CDR accounting with Asterisk + * + * The calls will automatically be logged as long as the module is loaded. + * + */ + + +CREATE TABLE cdr ( + AcctId BIGSERIAL PRIMARY KEY, + calldate TIMESTAMP with time zone NOT NULL DEFAULT now(), + clid VARCHAR(45) NOT NULL default '', + src VARCHAR(45) NOT NULL default '', + dst VARCHAR(45) NOT NULL default '', + dcontext VARCHAR(45) NOT NULL default '', + channel VARCHAR(45) NOT NULL default '', + dstchannel VARCHAR(45) NOT NULL default '', + lastapp VARCHAR(45) NOT NULL default '', + lastdata VARCHAR(45) NOT NULL default '', + duration INTEGER NOT NULL default '0', + billsec INTEGER NOT NULL default '0', + disposition VARCHAR(45) NOT NULL default '', + amaflags INTEGER NOT NULL default '0', + accountcode VARCHAR(45) NOT NULL default '', + uniqueid VARCHAR(45) NOT NULL default '' +); + -- cgit v1.2.3