Siremis v2.0 - Setup Accounting Services

Accounting Panel

Kamailio does event-based accounting, storing the START and STOP events for each call. By default the SIP server stores a very limited number of details for each event. Therefore you have to extend the tables to store the information you need.

Config file

Changes in file kamailio.cfg

  • make sure acc is configured with MySQL support
  • set db_extra parameter
      modparam("acc", "db_extra",


Kamailio database structure and stored procedure were created by Siremis Web Installation Wizard by checking “Update SIP Database” option in Step 2.

Generate CDRs

The stored procedure for generating CDRs was created during installation process. It is named kamailio_cdrs(). You have to execute it periodically from a cron.d job or you can user rtimer and sqlops modules to execute it periodically from Kamailio configuration file, like:

# -- for siremis CDRs --------------
modparam("rtimer", "timer", "name=cdr;interval=300;mode=1;")
modparam("rtimer", "exec", "timer=cdr;route=CDRS")
modparam("sqlops", "sqlcon", "cb=>mysql://openser:openserrw@localhost/openser")
# ======================================================
# Populate CDRs Table of Siremis
# ======================================================
route[CDRS] {
	sql_query("cb","call kamailio_cdrs()","rb");


Copyright 2010-2020