Mercurial > hg > freeDiameter
view doc/app_acct.conf.sample @ 529:be646053706b
Removed the NON NULL constraint to ease updates
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 03 Sep 2010 16:50:04 +0900 |
parents | 1b3b9790e7cb |
children | 4cdf146f11d5 |
line wrap: on
line source
####################### # This file contains the description of configuration and general information about the # "App_Acct" extension. # This extension provides a simple Diameter Accounting server. # The extension does receive the Accounting-Request message, then # saves the contents of the AVP in a database, as configured here. # The data is not processed at all. The intent is that a dedicated # application will then pull from this database and process the data (consolidate # sessions, ...) # In order to enable this extension, the main freeDiameter configuration file # must contain the following declaration: # LoadExtension = "extensions/app_acct.fdx" : "/path/to/app_acct.conf" ; ####################### ################# ## Part I: AVP ## ################# # Configure here the AVPs that must be stored in the database. # The format is: # "AVP-dictionary-name" = { # field = "db-field-name"; # required; # multi=N; # }; # Where: # AVP-dictionary-name: # The name of the AVP, such as "Session-Id". Only this field is mandatory. # field="...": # The name of the field in the database where is AVP contents will be saved. # The default is that the field is named as the AVP-dictionary-name. # required: # By default, if the AVP is not in the Diameter message, it is not passed in # the INSERT statement (will get NULL). If Required is specified for the AVP, # an error is returned in the Diameter answer, and the data is discarded. # multi=N: # If an AVP may appear several times in a request, you may specify a number of # occurrences to save in the database. The Nth first occurrences of the AVP # will be saved in fields "db-field-name1", "db-field-name2", ... "db-field-nameN" # # In case the default behavior for an AVP is fine, you can use the short syntax: # "AVP-dictionary-name"; # # Note that at the moment, GROUPED AVP are not supported. Also, only the top-level AVPs are # searched. This behavior can be changed quite easily if needed. # The following list is informative only. # You may also consult RFC4005 sections 10.2.1 and 10.2.2 for other examples # "Origin-Host"; # "Origin-Realm"; # "Destination-Realm"; # "Destination-Host"; # "Session-Id"; # "Origin-State-Id"; # "Accounting-Record-Type"; # "Accounting-Record-Number"; # "User-Name"; # "Event-Timestamp"; # "Acct-Application-Id"; # "Accounting-Sub-Session-Id"; # "Acct-Session-Id"; # "Acct-Multi-Session-Id"; # "Origin-AAA-Protocol"; # "Acct-Delay-Time"; # "NAS-Identifier"; # "NAS-IP-Address"; # "NAS-IPv6-Address"; # "NAS-Port"; # "NAS-Port-Id"; # "NAS-Port-Type"; # "Service-Type"; # "Termination-Cause"; # "Accounting-Input-Octets"; # "Accounting-Input-Packets"; # "Accounting-Output-Octets"; # "Accounting-Output-Packets"; # "Acct-Authentic"; # "Acct-Link-Count"; # "Acct-Session-Time"; # "Acct-Tunnel-Connection"; # "Acct-Tunnel-Packets-Lost"; # "Callback-Id"; # "Callback-Number"; # "Called-Station-Id"; # "Calling-Station-Id"; # "Connect-Info"; # "Originating-Line-Info"; # "Authorization-Lifetime"; # "Session-Timeout"; # "Idle-Timeout"; # "Port-Limit"; # "Accounting-Realtime-Required"; # "Acct-Interim-Interval"; # "Filter-Id"; # "NAS-Filter-Rule"; # "QoS-Filter-Rule"; # "Login-IP-Host"; # "Login-IPv6-Host"; # "Login-LAT-Group"; # "Login-LAT-Node"; # "Login-LAT-Port"; # "Login-LAT-Service"; # "Login-Service"; # "Login-TCP-Port"; # "Route-Record" = { multi=5; }; # Record the last 5 hops of the message # This is the database table corresponding to this list: # CREATE TABLE incoming ( # "recorded_on" timestamp with time zone NOT NULL, # "recorded_serv" bytea, # "Origin-Host" bytea NOT NULL, # "Origin-Realm" bytea NOT NULL, # "Destination-Realm" bytea, # "Destination-Host" bytea, # "Session-Id" bytea NOT NULL, # "Origin-State-Id" integer, # "Accounting-Record-Type" integer NOT NULL, # "Accounting-Record-Number" integer NOT NULL, # "User-Name" bytea, # "Event-Timestamp" bytea, # "Acct-Application-Id" integer, # "Accounting-Sub-Session-Id" bigint, # "Acct-Session-Id" bytea, # "Acct-Multi-Session-Id" bytea, # "Origin-AAA-Protocol" integer, # "Acct-Delay-Time" integer, # "NAS-Identifier" bytea, # "NAS-IP-Address" bytea, # "NAS-IPv6-Address" bytea, # "NAS-Port" integer, # "NAS-Port-Id" bytea, # "NAS-Port-Type" integer, # "Service-Type" integer, # "Termination-Cause" integer, # "Accounting-Input-Octets" bigint, # "Accounting-Input-Packets" bigint, # "Accounting-Output-Octets" bigint, # "Accounting-Output-Packets" bigint, # "Acct-Authentic" integer, # "Acct-Link-Count" integer, # "Acct-Session-Time" integer, # "Acct-Tunnel-Connection" bytea, # "Acct-Tunnel-Packets-Lost" integer, # "Callback-Id" bytea, # "Callback-Number" bytea, # "Called-Station-Id" bytea, # "Calling-Station-Id" bytea, # "Connect-Info" bytea, # "Originating-Line-Info" bytea, # "Authorization-Lifetime" integer, # "Session-Timeout" integer, # "Idle-Timeout" integer, # "Port-Limit" integer, # "Accounting-Realtime-Required" integer, # "Acct-Interim-Interval" integer, # "Filter-Id" bytea, # "NAS-Filter-Rule" bytea, # "QoS-Filter-Rule" bytea, # "Login-IP-Host" bytea, # "Login-IPv6-Host" bytea, # "Login-LAT-Group" bytea, # "Login-LAT-Node" bytea, # "Login-LAT-Port" bytea, # "Login-LAT-Service" bytea, # "Login-Service" integer, # "Login-TCP-Port" integer, # "Route-Record1" bytea, # "Route-Record2" bytea, # "Route-Record3" bytea, # "Route-Record4" bytea, # "Route-Record5" bytea # ); ####################### ## Part II: Database ## ####################### # You must specify the connection information to the database here. # Please note that if the connection is terminated, it will trig the shutdown of the freeDiameter daemon # For this reason, you should as much as possible use a local database. # ConnInfo: # The connection string to the database. See http://www.postgresql.org/docs/8.4/static/libpq-connect.html # Example: ConnInfo = "host=localhost port=5432 dbname=acct user=acct password=freediameter"; # Table: # The name of the table to use. The fields and types in this table must be created accordingly to the Part I configuration in this file. # Example: Table = "incoming"; # Timestamp_field: # Optionaly, you can specify a name of a field that will receive the value 'now' when a new record is inserted. # Default: no timestamp is inserted. # Example: Timestamp_field = "recorded_on"; # Server_name_field: # Optionaly, you can specify a field which will receive the Diameter Identity of the local server for each record saved. # This is useful especially if you have several Accounting servers and want to check Load-Balancing behavior or so, # after aggregating all the data. # Default: no server name inserted. # Example: Server_name_field = "recorded_serv";