{ // 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. "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 }, "chargers": { "enabled": true, }, "cdrc": [ { "id": "part1", "enabled": true, "cdr_format": "partial_csv", "cdr_in_dir": "/tmp/cdrctests/partcsv1/in", // absolute path towards the directory where the CDRs are stored "cdr_out_dir": "/tmp/cdrctests/partcsv1/out", // absolute path towards the directory where processed CDRs will be moved "cdr_source_id": "partial_csv_test", // free form field, tag identifying the source of the CDRs within CDRS database "partial_record_cache": "1s", // duration to cache partial records when not pairing "partial_cache_expiry_action": "*dump_to_file", "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 {"tag": "ToR", "field_id": "ToR", "type": "*composed", "value": "*voice", "mandatory": true}, {"tag": "AccId1", "field_id": "OriginID", "type": "*composed", "value": "~0"}, {"tag": "AccId2", "field_id": "OriginID", "type": "*composed", "value": "_"}, {"tag": "AccId3", "field_id": "OriginID", "type": "*composed", "value": "~1"}, {"tag": "AccId4", "field_id": "OriginID", "type": "*composed", "value": "_"}, {"tag": "AccId5", "field_id": "OriginID", "type": "*composed", "value": "~4"}, {"tag": "OrderID", "field_id": "OrderID", "type": "*unix_timestamp", "value": "~3"}, {"tag": "RequestType", "field_id": "RequestType", "type": "*composed", "value": "*rated", "mandatory": true}, {"tag": "Direction", "field_id": "Direction", "type": "*composed", "value": "*out", "mandatory": true}, {"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "cgrates.org", "mandatory": true}, {"tag": "Category", "field_id": "Category", "type": "*composed", "value": "call", "mandatory": true}, {"tag": "Account", "field_id": "Account", "type": "*composed", "value": "~0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true}, {"tag": "Destination", "field_id": "Destination", "type": "*composed", "value": "~1:s/^00(\\d+)$/+$1/", "mandatory": true}, {"tag": "SetupTime", "field_id": "SetupTime", "type": "*composed", "value": "~4", "mandatory": true}, {"tag": "AnswerTime", "field_id": "AnswerTime", "type": "*composed", "value": "~4", "mandatory": true}, {"tag": "Usage", "field_id": "Usage", "type": "*composed", "value": "~6:s/^(\\d+)$/${1}s/", "mandatory": true}, {"tag": "Partial", "field_id": "Partial", "type": "*composed", "value": "true", "filters":["*string:~10:partial"]}, ], "cache_dump_fields": [ {"tag": "OriginID", "type": "*composed", "value": "~OriginID"}, {"tag": "OrderID", "type": "*composed", "value": "~OrderID"}, {"tag": "RequestType", "type": "*composed", "value": "~RequestType"}, {"tag": "Account", "type": "*composed", "value": "~Account"}, {"tag": "Destination", "type": "*composed", "value": "~Destination"}, {"tag": "SetupTime", "type": "*composed", "value": "~SetupTime", "layout": "2006-01-02T15:04:05Z07:00"}, {"tag": "AnswerTime", "type": "*composed", "value": "~AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"}, {"tag": "Usage", "type": "*composed", "value": "~Usage"}, {"tag": "Cost", "type": "*composed", "value": "~Cost"}, ], }, { "id": "post_on_expiry", "enabled": true, "cdr_format": "partial_csv", "cdr_in_dir": "/tmp/cdrctests/partcsv2/in", // absolute path towards the directory where the CDRs are stored "cdr_out_dir": "/tmp/cdrctests/partcsv2/out", // absolute path towards the directory where processed CDRs will be moved "cdr_source_id": "partial_csv_test2", // free form field, tag identifying the source of the CDRs within CDRS database "partial_record_cache": "1s", // duration to cache partial records when not pairing "partial_cache_expiry_action": "*post_cdr", "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 {"tag": "ToR", "field_id": "ToR", "type": "*composed", "value": "*voice", "mandatory": true}, {"tag": "AccId1", "field_id": "OriginID", "type": "*composed", "value": "~0"}, {"tag": "AccId2", "field_id": "OriginID", "type": "*composed", "value": "_"}, {"tag": "AccId3", "field_id": "OriginID", "type": "*composed", "value": "~1"}, {"tag": "AccId4", "field_id": "OriginID", "type": "*composed", "value": "_"}, {"tag": "AccId5", "field_id": "OriginID", "type": "*composed", "value": "~4"}, {"tag": "OrderID", "field_id": "OrderID", "type": "*unix_timestamp", "value": "~3"}, {"tag": "RequestType", "field_id": "RequestType", "type": "*composed", "value": "*rated", "mandatory": true}, {"tag": "Direction", "field_id": "Direction", "type": "*composed", "value": "*out", "mandatory": true}, {"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "cgrates.org", "mandatory": true}, {"tag": "Category", "field_id": "Category", "type": "*composed", "value": "call", "mandatory": true}, {"tag": "Account", "field_id": "Account", "type": "*composed", "value": "~0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true}, {"tag": "Destination", "field_id": "Destination", "type": "*composed", "value": "~1:s/^00(\\d+)$/+$1/", "mandatory": true}, {"tag": "SetupTime", "field_id": "SetupTime", "type": "*composed", "value": "~4", "mandatory": true}, {"tag": "AnswerTime", "field_id": "AnswerTime", "type": "*composed", "value": "~4", "mandatory": true}, {"tag": "Usage", "field_id": "Usage", "type": "*composed", "value": "~6:s/^(\\d+)$/${1}s/", "mandatory": true}, {"tag": "Partial", "field_id": "Partial", "type": "*composed", "value": "true", "filters":["*string:~10:partial"]}, ], }, ], }