I want to log additional data from RADIUS accounting records to the Calls table, how can this be done?
May 7 2018
Starting Emerald version 6 this process is more complex than earlier versions of Emerald. Calls table is now a "View" and a trigger on this view is used to distribute data into CallStarts, CallInterims or CallStops tables as appropriate.
Adding an attribute follows the same naming and type conventions as for earlier versions.
However column must be added to one of the underlying tables, calls view updated to reflect data from the new column and finally calls trigger updated to enable recording of data into appropriate table.
Queries necessary to make changes to view and trigger should be copied into Emerald\sql\custom_ms.sql to ensure whenever a maintenance update is installed your customizations to Calls view and triggers are not overwritten in the process.
For reference SQL Server default queries to generate Calls view and triggers are located in Emerald\sql\ trig_ms.sql and view_ms.sql
May 16 2005
RADIUS Accounting data is added to the calls table dynamically based on the Columns of the Calls table and data avaliable in the RADIUS accounting messages being recorded.
For example when a RADIUS accounting message contains the Acct-Session-ID attribute its contents are added to the 'AcctSessionID' column of the calls table.
Additional attributes can be logged simply by adding new columns matching the names of existing attributes. Note after making changes to the Calls table you should restart your RadiusNT/X server. Also note Column names are added without the '-' marks. For example the Acct-Session-ID attribute has a Column label of 'AcctSessionID' in the Calls table. RadiusNT/X will automatically convert data types based on the properties of the columns of the Calls table. RADIUS data larger than a column is configured to hold will be truncated and a warning message generated in the accounting log file.
RADIUS string type attributes may contain any data up to 254 bytes in length.
RADIUS integer type attributes are unsigned 32-bit integers with possible values ranging from 0 to 4,294,967,296
Note: when a Calls column is of a string type, the RADIUS attribute is an integer AND there are dictionary values avaliable the numeric value recorded as a string value per the dictionary value of the attribute.