PBX Call Accounting Module
Overview
The Call Accounting Module is mainly responsible for allocating cost for Outbound and Inbound calls based on trunks, users, and user groups. The module can configure multiple "Rate Decks" associated with cost, to have cost on a per trunk basis. Each rate deck will have dial pattern sets along with an associated cost. Users can choose rate decks from Trunks/User management to decide which "rate deck" they want to use for the cost calculation of a call.
This module is applicable only for FreePBX 14+ systems.
Module
"Call Accounting" module is located under "Admin" Section.
Within the PBX GUI, navigate to Admin > Call Accounting
Call Accounting Dashboard
This will display the list of configured Call Rate Decks, Calls (current day), and Costs (current day).
Adding Call Rate Decks
Call Rate Deck is a collection of dial patterns associated with cost. We can create a new Rate Deck by using the "Add Rate Deck" option from "Dashboard".
After clicking on the "Add Rate Deck" button, it will pop up a window with the field "New Rate Deck Name" in order to enter a unique rate deck name.
After adding a "Rate deck" , the call accounting module will give you the option to "Add Dial patterns". Click on edit rate deck to add, edit or delete dial patterns associated to that Rate deck.
Add Dial patterns
By default there are no dial patterns associated with the newly created "Rate Deck".
We can add "dial patterns" either by selecting "Add Dial Pattern" button or by importing in bulk from the CSV file.
There are two ways to add dial patterns.
Bulk Handler Import
"Import" option will take you to Free PBX "Bulk Handler" module which will allow us to import the CSV file.
Please be careful in selecting "Deck Name" in bulk handler while uploading CSV file. Uploaded call rate deck CSV file will be associated with selected "Deck Name".
If we are coming from "Call Accounting → Add/Edit dial pattern → Import" then this will be auto-fill with your selected "Call Rate Deck" name.
If we want to upload Rate deck manually by login directly to Bulk handler then we need to make sure we are selecting proper "Rate deck" name.
If you select SKIP Validation, will take you to Bulk import Directly by skipping the data validation step. Where you will NOT have the validation option.
Its recommended to enable "Skip" validation for large volume of data.
Bulk Handler Required/Recommended Headers
Import view if you select skip validation = No
If Deck name column in CSV file which is going to be imported is blank (or not present) then it will use the deck name which is selected by you while uploading the CSV file.
After successful import of CSV ratedeck file, we can view the newly added "Dial patterns" from view/edit dial patterns actions from "Dashboard" against "Call Rate Deck Name".
Using Add dial pattern button
You can add individual dial patterns using
Edit a dial pattern
Bulk handler Export dial pattern
You have to use Bulk Handler to Export the dial patterns of a particular call rate deck
Associating Rate decks
Call Rate Deck can be assigned In two ways
Trunks
User management
Assigning to Trunks
"Edit Trunk → Rate Deck " .
We need to select the Call Rate Deck to calculate the cost of the calls associated with this Trunk.
Please note that, if there is any ambiguity in DAHDI trunks configuration for example one TDM port can be part of multiple trunks due to wrong configuration then Call Accounting module will not be able to find the proper rate deck associated with trunk.
Call Accounting module will generate (post reload) below Dashboard Warnings to notify the users for such ambiguity scenarios.
Using User management Module
Group wise
User wise
Inbound call billing
Inbound calls are billed based on the rate deck associated with the trunk, so it is mandatory to have the rate deck association with the trunk to bill the inbound calls.
Call Rate Deck Priority settings
In the case that the User and the the outgoing Trunk are associated with different Call Rate Decks then, you may set the priority in the Advanced Settings to choose which call rate deck should be given more priority for billing the calls.
Call Rate Deck Reports
We can download the CDR report either in CSV format or in PDF format.
There are two sections in the report:
CDR Summary Report
Detailed Call Report
Date Range: This is one of the search criteria, you may give any date range to filter the report, by default it will show the current date.
Source : Search for a particular source.
Call Deck: Select any individual Call Rate Deck or all call rate decks
User : Select any individual user or All Users
Group name: Select any individual Group or all User Groups
CDR Summary Report
This is the summary of calls and its costs of the given search condition
Detailed Call Report
Call Accounting Module Example
We can use our SIP Trunking Solution SIPSTATION rate deck file to use as reference. Please note this is just an example and nothing to do with the actual SIPSTATION SIP Trunk pricing.
Sample Call Rate Deck file - https://cdn.sangoma.com/wp-content/uploads/International-Rate-Deck-Dec1-2018.csv.pdf
First we have to create Time Group. We are doing this for All Day/All Time so creating below time group.
Call Accounting module has feature to do time based call cost calculation so we need to prepare CSV file based on above shared rate deck and append time group as extra column to each field.
Sample CSV file based on above mentioned rate deck -
Please follow steps as mentioned in this wiki (configuration section) and configure the rate deck with the help of above CSV file.
Please find attached Sample CDR summary report generated by Call Accounting module.