Clean up loopback / inaddr_any checks
[freeradius.git] / src / billing / clarent_db_schema-postgres.sql
1 /*
2  * Id: postgresql.conf,v 1.8.2.11 2003/07/15 11:15:43 pnixon Exp $
3  *
4  * --- Peter Nixon [ codemonkey@peternixon.net ]
5  * This is a custom SQL schema for doing Clarent VoIP accounting
6  * Clarents don't support RADIUS but I use this along with the other
7  * files in this directory to do billing so it can live here :-)
8  *
9  */
10
11 CREATE TABLE billing_record (
12   Id BIGSERIAL PRIMARY KEY,
13   local_SetupTime timestamp,
14   start_time NUMERIC(11),
15   duration INTEGER,
16   service_code CHAR(1),
17   phone_number VARCHAR(24),
18   ip_addr_ingress INET,
19   ip_addr_egress INET,
20   bill_type CHAR(1),
21   disconnect_reason CHAR(2),
22   extended_reason_code CHAR(2),
23   dialed_number VARCHAR(30),
24   port_number INTEGER,
25   codec VARCHAR(20),
26   h323ConfID VARCHAR(64)
27 );
28 create UNIQUE index combo on billing_record (start_time, ip_addr_ingress, h323ConfID);