Update VIEW calls to work with new call_history schema
authorpnixon <pnixon>
Wed, 11 Jun 2003 10:58:34 +0000 (10:58 +0000)
committerpnixon <pnixon>
Wed, 11 Jun 2003 10:58:34 +0000 (10:58 +0000)
src/billing/h323_db_postgresql.sql

index fabc709..a74162b 100644 (file)
@@ -226,10 +226,10 @@ SELECT RadAcctId AS ID, NASIPAddress AS GWIP, AcctSessionTime AS Call_Seconds, c
 FROM StopTelephony;
 
 CREATE OR REPLACE VIEW calls AS
-SELECT h323ConnectTime, AcctSessionTime, CalledStationId, H323RemoteAddress, NASIPAddress
+SELECT Date, Time, AcctSessionTime, CalledStationId, H323RemoteAddress, NASIPAddress
 FROM call_history
 WHERE AcctSessionTime > 0
-ORDER BY h323ConnectTime, CalledStationId, AcctSessionTime, H323RemoteAddress ASC;
+ORDER BY Date, Time, CalledStationId, AcctSessionTime, H323RemoteAddress ASC;
 
 CREATE OR REPLACE VIEW call_history_daily AS
 SELECT pots.h323ConnectTime, pots.AcctSessionTime, pots.CalledStationId, ip.H323RemoteAddress, pots.NASIPAddress