Every source of CDRS is configured as a distinct CDRs provider inside the Web UI in Params->CDRs Providers
.
cutomizations
directory, inheriting from some template job defined in apps/asterisell/lib/jobs/data_file_processing
directory and subdirectories, and then completing missing (abstract) parameters.
rating_tools/rate_engine/src/Asterisell/CustomerSpecificImporters.hs
, in the function supportedSourceCDRImporters
.
asterisell_instances.py
something like
class DefaultInstance(BillingInstance): ... def conf_connection_params(self): r = [] c = ConnectionParams() c.connection_name = 'import-remote-cdrs-SOME-SOURCE-NAME' c.provider = 'abilis-db-collector' c.user = 'some-user' c.password = self.get_password_for('SOME-SOURCE-NAME') c.host = 'some-host' c.port = '3306' c.dbName = 'abiliscpx' c.tableName = 'collector' c.timeFrameInMinutes = '0' c.dataSourceFormat = 'abilis-db-collector' c.dataSourceVersion = 'v1' c.fromDate = '2018-10-01' c.removeOlderThanDays = '0' r.append(c)
import-remote-cdrs-
will be used from the job ImportCDRSUsingAppConfs
for retrieving the data from the remote MySQL database, assuming it is in the abilis-db-collector
format.
rating_tools/rate_engine/src/Asterisell/CustomerSpecificImporters.hs
, in the function supportedSourceCDRImporters
.
CREATE USER 'someuser'@'localhost' IDENTIFIED BY 'somepassword'; CREATE USER 'someuser'@'10.10.10.10' IDENTIFIED BY 'somepassword'; GRANT SELECT,DELETE,UPDATE ON dbname.collector TO 'someuser'@'localhost'; GRANT SELECT,DELETE,UPDATE ON dbname.collector TO 'someuser'@'10.10.10.10'; FLUSH PRIVILEGES;
ALTER TABLE your_source_cdrs_table_name ENGINE=TokuDB ROW_FORMAT=TOKUDB_SNAPPY, DEFAULT CHARACTER SET = utf8mb4, DEFAULT COLLATE = utf8mb4_bin;