In a cluster setup, intermediate CDRs might be written to a different
host than the final CDRs (central vs pair).
Change-Id: I56716d2a96857d52715e48f513ee1d75676b1e52
* Fetch acc records both from mysql and redis
* Backup/trash redis acc records into mysql
* Introduce loglevel config option and log macros
Change-Id: I9bc55ed72502feaff03550c99ce481aea33e5e58
We need a new configuration file for multiple reasons. For security
purposes, to avoid passing passwords as part of the program arguments,
which are publicly visible. And to be able to use systemd services
files, because there's at least the maintenance configuration that's set
conditionally, and that's not easily supported in systemd service files.
Refactor the code to make it easier to add a simple config file parser,
based on a key or key=value per line, with support for comments starting
with # on the first column.
In addition this also gives us long command-line options for the
existing short options.
Change-Id: I611f262847fa2ec4e3c569ca27e01b691e585fcc
Revert logic to pick peer id from stop record. This needs a better
approach somehow.
Instead, add logic to always take -pbx_1 and -xfer_1 stop records
into account when searching for stop records, to fix duration of
CDRs on transfer and park/unpark (which is just a special case
of transfer).
Change-Id: Ia80add6d5cb762800c563889c0d95ee25ed74168
When enabled, mediator will look for acc records belonging to the
$ci_pbx-1 call leg and use the stop/bye records from this call leg in
place of the regular one.
Change-Id: I46d326fb30fcf105642d188a07ae771a659ff17f
- use separate user,pass,port,db for the stats database connection
- cosmetic change in the DEFAULT_STATS definition names
- add db connection info logging for PROV and STATS
Change-Id: I389bed46c634ac973616335581d7a7495d5866a3
- Calls info (call_code, period) data is accumulated into $stats_db.'call_info'
table on the cdr insert
- Add stats_db and stats_period options (1=hour, 2=day, 3=month)
Change-Id: I4e1f7655eebfbe45a43e2c34d9c3b3bffe05fb40