mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 21:59:53 +05:00
Consider Filter from Fields in cdrc
This commit is contained in:
committed by
Dan Christian Bogos
parent
8cce0ce7f0
commit
d9fa6bc4cc
58
data/conf/samples/csvwithfieldfilter/cgrates.json
Executable file
58
data/conf/samples/csvwithfieldfilter/cgrates.json
Executable file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
|
||||
// Real-time Charging System for Telecom & ISP environments
|
||||
// Copyright (C) ITsysCOM GmbH
|
||||
//
|
||||
// This file contains the default configuration hardcoded into CGRateS.
|
||||
// This is what you get when you load CGRateS with an empty configuration file.
|
||||
"general": {
|
||||
"log_level": 7,
|
||||
},
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true // so we can query CDRs
|
||||
},
|
||||
|
||||
"cdrs": {
|
||||
"enabled": true,
|
||||
"rals_conns": [], // no rating support, just *raw CDR testing
|
||||
},
|
||||
|
||||
|
||||
|
||||
"cdrc": [
|
||||
{
|
||||
"id": "*CSVit4", // identifier of the CDRC runner
|
||||
"enabled": true, // enable CDR client functionality
|
||||
"field_separator": ";",
|
||||
"cdr_in_dir": "/tmp/csvwithfielfilter/csvit2/in", // absolute path towards the directory where the CDRs are stored
|
||||
"cdr_out_dir": "/tmp/csvwithfielfilter/csvit2/out", // absolute path towards the directory where processed CDRs will be moved
|
||||
"cdr_source_id": "csvit4", // free form field, tag identifying the source of the CDRs within CDRS database
|
||||
"filters":["*string:1:*postpaid"], //filter Account to be 1002
|
||||
"content_fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"id": "TOR", "field_id": "ToR", "type": "*composed", "value": "*voice", "mandatory": true},
|
||||
{"id": "OriginID", "field_id": "OriginID", "type": "*composed", "value": "~0", "mandatory": true},
|
||||
{"id": "RequestType", "field_id": "RequestType", "type": "*composed", "value": "~1", "mandatory": true},
|
||||
{"id": "Direction", "field_id": "Direction", "type": "*composed", "value": "*out", "mandatory": true},
|
||||
{"id": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "~2", "mandatory": true},
|
||||
{"id": "Category", "field_id": "Category", "type": "*composed", "value": "call", "mandatory": true},
|
||||
{"id": "Account", "field_id": "Account", "type": "*composed", "value": "~3", "mandatory": true},
|
||||
{"id": "Subject", "field_id": "Subject", "type": "*composed", "value": "~3", "mandatory": true},
|
||||
{"id": "Destination", "field_id": "Destination", "type": "*composed", "value": "~4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"id": "SetupTime", "field_id": "SetupTime", "type": "*composed", "value": "~5", "mandatory": true},
|
||||
{"id": "AnswerTime", "field_id": "AnswerTime", "type": "*composed", "value": "~5", "mandatory": true},
|
||||
{"id": "Usage", "field_id": "Usage", "type": "*composed", "value": "~6", "mandatory": true},
|
||||
{"id": "HDRExtra3", "field_id": "HDRExtra3", "type": "*composed", "value": "~6", "mandatory": true},
|
||||
{"id": "HDRExtra2", "field_id": "HDRExtra2", "type": "*composed", "value": "~6", "mandatory": true},
|
||||
{"id": "HDRExtra1", "field_id": "HDRExtra1", "type": "*composed", "value": "~6", "mandatory": true},
|
||||
{"id": "RandomVal", "field_id": "RandomVal", "type": "*composed", "value": "*randomValue","filters":["*string:3:1001"]},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user