EDR Manager
EDR Manager
The EDR manager is a Lua object that is used to write all EDRs for N2IWF processing.
As the network session progresses through the N2IWF states, EDR information is passed to the EDR manager and EDRs are written as instructed.
Note that only a single instance of any given EDR type is available to be manipulated within the EDR manager at any given time. Requests to create EDRs will create a new instance if none already exists, and will update the fields of the current EDR of that type otherwise. Writing EDRs will flush all pending EDRs and allow the creation of new ones.
Attributes
The EDR manager should only be modified using its methods. Direct access to its attributes is not recommended.
Methods
Note that as the EDR manager is a Lua object, its methods should be accessed using the colon operator, e.g.:
edr_manager:write_edrs ()
As N2IWF EDRs have a fixed base format, the exposed methods of the EDR manager only allow for certain fields to be added in their signatures. For additional field population, use N2SVCD rule engine variables.
set_edr_grace / set_edr_diameter
These functions are used to create GRACE and DIAMETER EDRs, respectively.
Both functions take a single argument - the current service context.
These functions return nothing.
update_edr_diameter_rule
This function is used to update an existing DIAMETER EDR once rule selection is complete.
This function takes two positional parameters:
- The action string that has been selected for use.
- Whether the action represents a failure at the billing layer.
set_edr_problem
This function is used to create a PROBLEM EDR.
This function takes three positional parameters:
- The action string that has been selected for use.
- A freeform string for the error class.
- A freeform string containing the error message.
This function returns nothing.
set_edr_external
This function is used to create an EXTERNAL EDR.
This function takes three positional parameters:
- The external action type string that was executed.
- The external action name string that was executed.
- Whether the external action was configured as mandatory.
This function returns nothing.
update_edr_external_failed
This function is used to update an existing EXTERNAL EDR to record the failure of an external action.
This function takes one parameter, a freeform string containing the error message.
This function returns nothing.
update_edr_external_succeeded
This function is used to update an existing EXTERNAL EDR to record the success of an external action.
This function takes no parameters and returns nothing.
set_edr_pre / set_edr_post
These functions are used to create PRE and POST EDRs, respectively.
Both functions take a single argument - the action string that has been selected for use.
These functions return nothing.
update_edr_post_loop
This function is used to update an existing POST EDR to record a loop occurring.
This function takes three positional parameters:
This function returns nothing.
write_edrs
This function is used to flush all pending EDRs, if any, for writing.
This function takes no parameters and returns nothing.