Loading CDRs¶
With Hydra Billing, you can either have online pre-authorization and phone calls rating, or have ended phone calls rated by periodical loading CDR files (offline mode). Check the list of PBXs with supported CDR formats at our website.
Working with CDRs Online¶
A FreeRADIUS server processes CDR online, so you should create a special RADIUS network service for it in the system. The interaction between the server and Hydra Billing is done by an agent application called HARD (Hydra Autonomous RADIUS Daemon).
A softswitch sends a RADIUS packet to the server for authorization. The server decodes the packet, and passes RADIUS attributes and their values to the HARD agent. HARD identifies a telephony network service by the softswitch IP address (the address should be entered in the management settings of the network service) and the corresponding RADIUS network service. Depending on the settings of the RADIUS network service, HARD requests necessary data from the system: a customer and CPE data, access services statuses, etc. If the authorization request is approved and the customer is granted access to service, HARD sends the response with attributes and their values defined for RADIUS network service to the RADIUS server. Then the server forms and sends an Access-Accept packet, otherwise, an Access-Reject packet is sent. However, if there are Access-Accept attributes when service is disabled specified in the RADIUS service settings, an Access-Accept packet with these attributes is sent.
Online call processing is done in the following way. At the start of a call, i.e. on receiving an Accounting-Request RADIUS packet with Acct-Status-Type = Start, the system creates a CDR for the call. Further, during the call, the CDR is updated via packets with Acct-Status-Type = Interim-Update. When the call ends (i.e. a packet with Acct-Status-Type = Stop is received), the status of the CDR becomes Finished, and its rating starts.
If the CDR has not been updated for a long time, it can be closed by the Forced closing old CDRs task bound to telephony network service.
Loading CDRs Offline¶
In order to load and rate files with CDRs, the system uses Hydra Mediation Daemon (HMED) and Hydra Online Charging System (HOCS).
The HMED-C collector, which is a part of the mediation module, monitors one or several directories on the server. When new suitable files appear, it reads and parses them, then forwards all call data to the core of the mediation module (HMED-M). Processed files are then deleted.
Adding files with CDRs to the directories, as well as moving them to an archive is done by third-party tools. If necessary, please contact our technical support for assistance.
The HMED-M core checks CDRs, processes and filters them according to the rules set in its configuration: it cuts off invalid CDRs, matches providers by trunks, converts phone numbers from the format used by a PBX into E.164 numbering plan, etc.
Prepared CDRs are forwarded to HOCS which loads them into Hydra and initiates the rating procedure.