This shows you the differences between two versions of the page.
— | siremis:install20:accounting [2011/07/19 09:24] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== 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(" | ||
+ | " | ||
+ | </ | ||
+ | |||
+ | ===== Database ===== | ||
+ | |||
+ | Kamailio database structure and stored procedure were created by Siremis Web Installation Wizard by checking " | ||
+ | |||
+ | ===== 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: | ||
+ | |||
+ | <code c> | ||
+ | # -- for siremis CDRs -------------- | ||
+ | modparam(" | ||
+ | modparam(" | ||
+ | modparam(" | ||
+ | |||
+ | |||
+ | |||
+ | # ====================================================== | ||
+ | # Populate CDRs Table of Siremis | ||
+ | # ====================================================== | ||
+ | route[CDRS] { | ||
+ | sql_query(" | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | {{tag> |