Reformat queries to be multiline
authorpnixon <pnixon>
Wed, 16 Jul 2003 15:18:56 +0000 (15:18 +0000)
committerpnixon <pnixon>
Wed, 16 Jul 2003 15:18:56 +0000 (15:18 +0000)
src/billing/pgsql-voip.conf

index 1dfc0e1..5f27ab9 100644 (file)
@@ -41,7 +41,7 @@ sql {
        num_sql_socks = 25
        
        # Radius server name so you can tell which radius server handled a request
-       # when all records are in one database.
+       # when you have multiple radius servers and one database.
        radius_server_name = myservername
 
        #######################################################################
@@ -79,13 +79,32 @@ sql {
 
        # Note: The VoIP accouting does not need Alternate queries in the shipped
        # configuration as all queries are INSERTS, hence should always work.
+       # If they do not work then you probably have duplicate records in your table.
        
 
-        accounting_start_query = "INSERT into ${acct_table1}%{h323-call-type} (RadiusServerName, AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortType, AcctStartTime, ConnectInfo_start, CalledStationId, CallingStationId, ServiceType, FramedIPAddress, AcctStartDelay, h323gwid, h323callorigin, h323calltype, h323setuptime, h323confid, AcctStatusType) values('${radius_server_name}', '%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port-Type}', '%S', '%{Connect-Info}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-IP-Address}', '%{Acct-Delay-Time:-0}', '%{h323-gw-id}', '%{h323-call-origin}', '%{h323-call-type}', strip_dot('%{h323-setup-time}'), '%{h323-conf-id}', 'Start')"
+        accounting_start_query = "INSERT into ${acct_table1}%{h323-call-type} \
+               (RadiusServerName, AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortType, AcctStartTime, \
+               ConnectInfo_start, CalledStationId, CallingStationId, ServiceType, FramedIPAddress, AcctStartDelay, \
+               h323gwid, h323callorigin, h323calltype, h323setuptime, h323confid, AcctStatusType) \
+               values('${radius_server_name}', '%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', \
+               '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port-Type}', '%S', '%{Connect-Info}', '%{Called-Station-Id}', \
+               '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-IP-Address}', '%{Acct-Delay-Time:-0}', '%{h323-gw-id}', \
+               '%{h323-call-origin}', '%{h323-call-type}', strip_dot('%{h323-setup-time}'), '%{h323-conf-id}', 'Start')"
 
 
-       accounting_stop_query = "INSERT into ${acct_table2}%{h323-call-type} (RadiusServerName, AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortType, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStopDelay, H323RemoteAddress, AcctStatusType, CiscoNASPort, h323calltype, h323callorigin, h323confid, h323connecttime, h323disconnectcause, h323disconnecttime, h323gwid, h323setuptime) values('ank-rad1', '%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port-Type}', '%S', '%{Acct-Session-Time:-0}', '%{Acct-Authentic}', '', '%{Connect-Info}', '%{Acct-Input-Octets:-0}', '%{Acct-Output-Octets:-0}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{Acct-Delay-Time:-0}', '%{h323-remote-address}', 'Stop', '%{Cisco-NAS-Port}', '%{h323-call-type}', '%{h323-call-origin}', '%{h323-conf-id}', strip_dot('%{h323-connect-time}'), '%{h323-disconnect-cause}', strip_dot('%{h323-disconnect-time}'), '%{h323-gw-id}', strip_dot('%{h323-setup-time}'))"
+       accounting_stop_query = "INSERT into ${acct_table2}%{h323-call-type} \
+               (RadiusServerName, AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortType, AcctStopTime, \
+               AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, \
+               CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, \
+               AcctStopDelay, H323RemoteAddress, AcctStatusType, CiscoNASPort, h323calltype, h323callorigin, h323confid, \
+               h323connecttime, h323disconnectcause, h323disconnecttime, h323gwid, h323setuptime) \
+               values('ank-rad1', '%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', \
+               '%{NAS-IP-Address}', '%{NAS-Port-Type}', '%S', '%{Acct-Session-Time:-0}', '%{Acct-Authentic}', '', \
+               '%{Connect-Info}', '%{Acct-Input-Octets:-0}', '%{Acct-Output-Octets:-0}', '%{Called-Station-Id}', \
+               '%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}', '%{Framed-Protocol}', \
+               '%{Framed-IP-Address}', '%{Acct-Delay-Time:-0}', '%{h323-remote-address}', 'Stop', '%{Cisco-NAS-Port}', \
+               '%{h323-call-type}', '%{h323-call-origin}', '%{h323-conf-id}', strip_dot('%{h323-connect-time}'), \
+               '%{h323-disconnect-cause}', strip_dot('%{h323-disconnect-time}'), '%{h323-gw-id}', strip_dot('%{h323-setup-time}'))"
  
 
-
 }