siremis:install20:accounting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

siremis:install20:accounting [2011/07/19 09:24] (current)
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
 +<​code>​
 +      modparam("​acc",​ "​db_extra",​
 +        "​src_user=$fU;​src_domain=$fd;​dst_user=$rU;​dst_domain=$rd;​src_ip=$si"​)
 +</​code>​
 +
 +===== Database =====
 +
 +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:
 +
 +<code c>
 +# -- 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"​);​
 +}
 +</​code>​
 +
 +{{tag>​siremis kamailio}}


Copyright 2010-2019 Asipto.com