From aab453f52a37cfc43230e67c713ff7d605e7dd16 Mon Sep 17 00:00:00 2001 From: Daniel Swarbrick Date: Mon, 3 Jan 2011 14:01:08 +0100 Subject: [PATCH] tweak create.sql and config file --- conf/autoload_configs/cdr_pg_csv.conf.xml | 7 +++-- .../event_handlers/mod_cdr_pg_csv/create.sql | 26 ++----------------- .../mod_cdr_pg_csv/mod_cdr_pg_csv.c | 1 - 3 files changed, 5 insertions(+), 29 deletions(-) diff --git a/conf/autoload_configs/cdr_pg_csv.conf.xml b/conf/autoload_configs/cdr_pg_csv.conf.xml index bddd387b70..e17809780c 100644 --- a/conf/autoload_configs/cdr_pg_csv.conf.xml +++ b/conf/autoload_configs/cdr_pg_csv.conf.xml @@ -1,8 +1,5 @@ - - - @@ -10,6 +7,9 @@ + + + @@ -17,4 +17,3 @@ - diff --git a/src/mod/event_handlers/mod_cdr_pg_csv/create.sql b/src/mod/event_handlers/mod_cdr_pg_csv/create.sql index 83cfec1ec7..9a39b0b57f 100644 --- a/src/mod/event_handlers/mod_cdr_pg_csv/create.sql +++ b/src/mod/event_handlers/mod_cdr_pg_csv/create.sql @@ -1,5 +1,6 @@ +-- Sample CDR table schema -create table a ( +create table cdr ( id serial primary key, local_ip_v4 inet not null, caller_id_name varchar, @@ -20,26 +21,3 @@ create table a ( sip_hangup_disposition varchar, ani varchar ); - -create table g ( - id serial primary key, - local_ip_v4 inet not null, - caller_id_name varchar, - caller_id_number varchar, - destination_number varchar not null, - context varchar not null, - start_stamp timestamp with time zone not null, - answer_stamp timestamp with time zone, - end_stamp timestamp with time zone not null, - duration int not null, - billsec int not null, - hangup_cause varchar not null, - uuid uuid not null, - bleg_uuid uuid, - accountcode varchar, - read_codec varchar, - write_codec varchar, - sip_hangup_disposition varchar, - ani varchar -); - diff --git a/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c b/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c index 45951f68bf..9da7c9dfcb 100644 --- a/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c +++ b/src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c @@ -457,7 +457,6 @@ static void event_handler(switch_event_t *event) PQfinish(globals.db_connection); globals.db_online = 0; } - } }