diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-10-13 18:18:15 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-10-13 18:18:15 +0000 |
commit | 2e1e0cfd772324aa2a7931af1918d24141454071 (patch) | |
tree | 6e3aa5e24cbf7544babacbde9fc6cecabff2eb3a /contrib/scripts | |
parent | a84265150b28f59db7ffd9ad2fe7351548ae558b (diff) |
Add contributed postgreSQL schema for CDR (bug #381)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1628 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'contrib/scripts')
-rwxr-xr-x | contrib/scripts/postgres_cdr.sql | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/contrib/scripts/postgres_cdr.sql b/contrib/scripts/postgres_cdr.sql new file mode 100755 index 000000000..3db3fc037 --- /dev/null +++ b/contrib/scripts/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 '' +); + |