]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak create.sql and config file
authorDaniel Swarbrick <daniel@seventhsignal.de>
Mon, 3 Jan 2011 13:01:08 +0000 (14:01 +0100)
committerDaniel Swarbrick <daniel@seventhsignal.de>
Mon, 3 Jan 2011 13:01:08 +0000 (14:01 +0100)
conf/autoload_configs/cdr_pg_csv.conf.xml
src/mod/event_handlers/mod_cdr_pg_csv/create.sql
src/mod/event_handlers/mod_cdr_pg_csv/mod_cdr_pg_csv.c

index bddd387b704069d2f34ca4e5bebdeeff7f933511..e17809780cbde647bf82e725dd4472c23ad754c7 100644 (file)
@@ -1,8 +1,5 @@
 <configuration name="cdr_pg_csv.conf" description="CDR PG CSV Format">
   <settings>
-    <!-- 'cdr-pg-csv' will always be appended to log-base -->
-    <!--<param name="log-base" value="/var/log"/>-->
-    <param name="rotate-on-hup" value="true"/>
     <!-- Log a-leg (a), b-leg (b) or both (ab) -->
     <param name="legs" value="a"/>
     <!-- See parameters for PQconnectdb() at http://www.postgresql.org/docs/8.4/static/libpq-connect.html -->
@@ -10,6 +7,9 @@
     <!-- CDR table name -->
     <!--<param name="db-table" value="cdr"/>-->
     <param name="default-template" value="example"/>
+    <!-- 'cdr-pg-csv' will always be appended to log-base -->
+    <!--<param name="log-base" value="/var/log"/>-->
+    <param name="rotate-on-hup" value="true"/>
     <!-- This is like the info app but after the call is hung up -->
     <!--<param name="debug" value="true"/>-->
   </settings>
@@ -17,4 +17,3 @@
     <template name="example">"${local_ip_v4}","${caller_id_name}","${caller_id_number}","${destination_number}","${context}","${start_stamp}","${answer_stamp}","${end_stamp}","${duration}","${billsec}","${hangup_cause}","${uuid}","${bleg_uuid}","${accountcode}","${read_codec}","${write_codec}","${sip_hangup_disposition}","${ani}"</template>
   </templates>
 </configuration>
-
index 83cfec1ec782b7de39d195aa64bf334d92bc4dfe..9a39b0b57f06e7db3b1ca2fa2290f9b9393bd8f5 100644 (file)
@@ -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
-);
-
index 45951f68bfdef9c9bedf30db4308f2dd7ff6b159..9da7c9dfcbb9cf96f7ee8ba2a6fb9ff041a89732 100644 (file)
@@ -457,7 +457,6 @@ static void event_handler(switch_event_t *event)
                        PQfinish(globals.db_connection);
                        globals.db_online = 0;
                }
-
        }
 }