How it Works

CDR-Stats is free and open source call detail record and analysis reporting software for Freeswitch, Asterisk, Kamailio, and almost all other types of telecoms switch.

CDR-Stats’ Components

CDR-Stats is built on an open source software consisting of, but not limited to:-

Django: Django is a Python based web framework that allows rapid development, with a clean and pragmatic design.

PostgreSQL: PostgreSQL is an object-relational database management system (ORDBMS) with an emphasis on extensibility and standards-compliance. PostgreSQL provides Materialized view and JSON Data type which makes it a perfect database backend for CDR-Stats.

Celery: Celery is used to process millions of tasks per day, and is employed in CDR-Stats to monitor call detail records being added, calculating things like the average length of call, failed calls, and calls to unexpected destinations, all of which may suggest either a fault or fraud in progress. CDR-Stats could be developed to trigger events on a remote switch such as blocking an IP address in reaction to certain predefined conditions being met.

Socket.IO: Socket.IO is used to get realtime information from a remote switch so that concurrent calls can be displayed in realtime. Currently there are connectors supplied with CDR-Stats for Freeswitch only.

Bootstrap: Originally developed by Twitter, Bootstrap allows CDR-Stats to be fully responsive. That is to say that the web interface components will scale according the resolution and device viewing CDR-Stats, so CDR-Stats looks good on any web browsing device from a smartphone, tablet or computer monitor.

Joining it Together


Freeswitch has a SQLite /Postgresql module, that writes CDR as they are created into the CDR-Stats database where they can be queried and interrogated.


We have written a custom module for Asterisk that extracts the CDR from the CDR database in Asterisk, and writes them into CDR-Stats core Database. In Asterisk you can use Mysql, PostgreSQL or SQLite to store your CDRs.


In Kamailio you can store your CDR using Mysql, using the acc module. This allows to easily create a connector to import Kamailio CDRs to CDR-Stats core database.

Other Switches and Carrier CDR

A text file in CSV (comma separated values) can extracted from the source switch, then uploaded via the CDR-Stats web interface, and the fields correctly assigned. Some manipulation of the values in the CDR may have to be adjusted and sanitised for compatibility.

In the future, other connectors may be written to interface with other switches as demand dictates. Contact us for more details.


CDR-Stats Architecture



CDR-Stats is a web/server based application primarily designed and tested for installation on Linux, CDR-Stats could be installed on the same server as the switch, but we recommend that you install it on a separate system. One single CDR-Stats server can be linked to many switches and provide reporting to your customer, as multi-tenant capability is built-in the core of CDR-Stats.

For really large deployments, CDR-Stats can be installed on an array of servers to scale to querying possibly billions of call detail records.

For installation instructions, a Beginner’s Guide to install CDR-Stats has been provided along with automated installation scripts for a range of scenarios.