mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 00:28:44 +05:00
Local tests fixups
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
# CGRateS Configuration file
|
||||
#
|
||||
# This file contains the default configuration hardcoded into CGRateS.
|
||||
# This is what you get when you load CGRateS with an empty configuration file.
|
||||
# [global] must exist in all files, rest of the configuration is inter-changeable.
|
||||
|
||||
[rater]
|
||||
enabled = true # Enable RaterCDRSExportPath service: <true|false>.
|
||||
|
||||
[scheduler]
|
||||
enabled = true # Starts Scheduler service: <true|false>.
|
||||
|
||||
[cdrs]
|
||||
enabled = true # Start the CDR Server service: <true|false>.
|
||||
mediator = internal # Address where to reach the Mediator. Empty for disabling mediation. <""|internal>
|
||||
|
||||
[cdre]
|
||||
export_dir = /tmp/cgrates/cdr/cdre/csv # Path where the exported CDRs will be placed
|
||||
|
||||
[cdrc]
|
||||
enabled = true
|
||||
cdrs = 127.0.0.1:2080
|
||||
cdr_in_dir = /tmp/cgrates/cdr/cdrc/in # Absolute path towards the directory where the CDRs are stored.
|
||||
cdr_out_dir =/tmp/cgrates/cdr/cdrc/out # Absolute path towards the directory where processed CDRs will be moved.
|
||||
|
||||
[mediator]
|
||||
enabled = true # Starts Mediator service: <true|false>.
|
||||
rater = internal # Address where to reach the Rater: <internal|x.y.z.y:1234>
|
||||
cdrstats=
|
||||
|
||||
|
||||
|
||||
29
data/conf/samples/cdrstats/cdrstats.json
Normal file
29
data/conf/samples/cdrstats/cdrstats.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
// CGRateS Configuration file
|
||||
//
|
||||
// Used in apier_local_tests
|
||||
// Starts rater, cdrs and mediator connecting over internal channel
|
||||
|
||||
"rater": {
|
||||
"enabled": true, // enable Rater service: <true|false>
|
||||
},
|
||||
|
||||
"cdrs": {
|
||||
"enabled": true, // start the CDR Server service: <true|false>
|
||||
"mediator": "internal", // address where to reach the Mediator. Empty for disabling mediation. <""|internal>
|
||||
"store_disable": true, // when true, CDRs will not longer be saved in stordb, useful for cdrstats only scenario
|
||||
},
|
||||
|
||||
"mediator": {
|
||||
"enabled": true, // starts Mediator service: <true|false>.
|
||||
"cdrstats": "internal", // address where to reach the cdrstats service. Empty to disable stats gathering out of mediated CDRs <""|internal|x.y.z.y:1234>
|
||||
"store_disable": true, // when true, CDRs will not longer be saved in stordb, useful for cdrstats only scenario
|
||||
},
|
||||
|
||||
"cdrstats": {
|
||||
"enabled": true, // starts the cdrstats service: <true|false>
|
||||
"queue_length": 5, // number of items in the stats buffer
|
||||
"time_window": "0", // will only keep the CDRs who's call setup time is not older than time.Now()-TimeWindow
|
||||
},
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
# 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.
|
||||
|
||||
[rater]
|
||||
enabled = true
|
||||
|
||||
[cdrs]
|
||||
enabled = true
|
||||
mediator = internal
|
||||
store_disable = true
|
||||
|
||||
[mediator]
|
||||
enabled = true
|
||||
store_disable = true
|
||||
cdrstats = internal
|
||||
|
||||
[cdrstats]
|
||||
enabled = true
|
||||
queue_length = 5 # Maximum number of items in the stats buffer
|
||||
time_window = 0 # Queue is not affected by the SetupTime
|
||||
21
data/conf/samples/cdrsv2mysql/cdrsv2mysql.json
Normal file
21
data/conf/samples/cdrsv2mysql/cdrsv2mysql.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
// CGRateS Configuration file
|
||||
//
|
||||
// Used in apier_local_tests
|
||||
// Starts rater, cdrs and mediator connecting over internal channel
|
||||
|
||||
"rater": {
|
||||
"enabled": true, // enable Rater service: <true|false>
|
||||
},
|
||||
|
||||
"cdrs": {
|
||||
"enabled": true, // start the CDR Server service: <true|false>
|
||||
"mediator": "internal", // address where to reach the Mediator. Empty for disabling mediation. <""|internal>
|
||||
},
|
||||
|
||||
"mediator": {
|
||||
"enabled": true, // starts Mediator service: <true|false>.
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
# Sample configuration for testing cdrs using postgres
|
||||
#
|
||||
|
||||
[rater]
|
||||
enabled = true # Enable RaterCDRSExportPath service: <true|false>.
|
||||
|
||||
[cdrs]
|
||||
enabled = true # Start the CDR Server service: <true|false>.
|
||||
mediator = internal # Address where to reach the Mediator. Empty for disabling mediation. <""|internal>
|
||||
|
||||
[mediator]
|
||||
enabled = true # Starts Mediator service: <true|false>.
|
||||
rater = internal # Address where to reach the Rater: <internal|x.y.z.y:1234>
|
||||
27
data/conf/samples/cdrsv2psql/cdrsv2psql.json
Normal file
27
data/conf/samples/cdrsv2psql/cdrsv2psql.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
// CGRateS Configuration file
|
||||
//
|
||||
// Used in apier_local_tests
|
||||
// Starts rater, cdrs and mediator connecting over internal channel
|
||||
|
||||
"stor_db": {
|
||||
"db_type": "postgres", // stor database type to use: <mysql|postgres>
|
||||
"db_port": 5432, // the port to reach the stordb
|
||||
},
|
||||
|
||||
|
||||
"rater": {
|
||||
"enabled": true, // enable Rater service: <true|false>
|
||||
},
|
||||
|
||||
"cdrs": {
|
||||
"enabled": true, // start the CDR Server service: <true|false>
|
||||
"mediator": "internal", // address where to reach the Mediator. Empty for disabling mediation. <""|internal>
|
||||
},
|
||||
|
||||
"mediator": {
|
||||
"enabled": true, // starts Mediator service: <true|false>.
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
# Sample configuration for testing cdrs using postgres
|
||||
#
|
||||
|
||||
[global]
|
||||
stordb_type = postgres # Stor database type to use: <mysql|postgres>
|
||||
stordb_port = 5432 # The port to reach the stordb.
|
||||
|
||||
[rater]
|
||||
enabled = true # Enable RaterCDRSExportPath service: <true|false>.
|
||||
|
||||
[cdrs]
|
||||
enabled = true # Start the CDR Server service: <true|false>.
|
||||
mediator = internal # Address where to reach the Mediator. Empty for disabling mediation. <""|internal>
|
||||
|
||||
[mediator]
|
||||
enabled = true # Starts Mediator service: <true|false>.
|
||||
rater = internal # Address where to reach the Rater: <internal|x.y.z.y:1234>
|
||||
@@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="cgrates/xml">
|
||||
<configuration section="cdre" type="fixed_width" id="CDREFW-A">
|
||||
<cdr_format>fwv</cdr_format>
|
||||
<data_usage_multiply_factor>0.0</data_usage_multiply_factor>
|
||||
<cost_multiply_factor>0.0</cost_multiply_factor>
|
||||
<cost_shift_digits>0</cost_shift_digits>
|
||||
<mask_destination_id>MASKED_DESTINATIONS</mask_destination_id>
|
||||
<mask_length>0</mask_length>
|
||||
<export_dir>/var/log/cgrates/cdre</export_dir>
|
||||
<export_template>
|
||||
<header>
|
||||
<fields>
|
||||
<field name="Filler1" type="filler" width="4" />
|
||||
</fields>
|
||||
</header>
|
||||
<content>
|
||||
<fields>
|
||||
<field name="TypeOfRecord" type="constant" value="call" />
|
||||
</fields>
|
||||
</content>
|
||||
<trailer>
|
||||
<fields>
|
||||
<field name="Filler1" type="filler" width="3" />
|
||||
</fields>
|
||||
</trailer>
|
||||
</export_template>
|
||||
</configuration>
|
||||
</document>
|
||||
@@ -1,13 +0,0 @@
|
||||
# CGRateS Configuration file
|
||||
#
|
||||
# This file contains the default configuration hardcoded into CGRateS.
|
||||
# This is what you get when you load CGRateS with an empty configuration file.
|
||||
# [global] must exist in all files, rest of the configuration is inter-changeable.
|
||||
|
||||
[global]
|
||||
xmlcfg_path = /usr/share/cgrates/conf/samples/cgr_addconfig.xml # Path towards additional config defined in xml file
|
||||
|
||||
[cdre]
|
||||
cdr_format = fixed_width # Exported CDRs format <csv>
|
||||
export_template = *xml:CDREFW-A # Exported fields template <""|fld1,fld2|*xml:instance_name>
|
||||
|
||||
32
data/conf/samples/multifiles/a.json
Normal file
32
data/conf/samples/multifiles/a.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
// CGRateS Configuration file
|
||||
// Used in multifile configuration tests
|
||||
// Should be the first file loaded
|
||||
|
||||
"general": {
|
||||
"default_reqtype": "postpaid", // default request type to consider when missing from requests: <""|prepaid|postpaid|pseudoprepaid|rated>
|
||||
},
|
||||
|
||||
"cdre": {
|
||||
"*default": {
|
||||
"content_fields": [ // template of the exported content fields
|
||||
{"tag": "CgrId", "cdr_field_id": "cgrid", "type": "cdrfield", "value": "cgrid"},
|
||||
{"tag":"RunId", "cdr_field_id": "mediation_runid", "type": "cdrfield", "value": "mediation_runid"},
|
||||
{"tag":"Tor", "cdr_field_id": "tor", "type": "cdrfield", "value": "tor"},
|
||||
{"tag":"AccId", "cdr_field_id": "accid", "type": "cdrfield", "value": "accid"},
|
||||
{"tag":"ReqType", "cdr_field_id": "reqtype", "type": "cdrfield", "value": "reqtype"},
|
||||
{"tag":"Direction", "cdr_field_id": "direction", "type": "cdrfield", "value": "direction"},
|
||||
{"tag":"Tenant", "cdr_field_id": "tenant", "type": "cdrfield", "value": "tenant"},
|
||||
{"tag":"Category", "cdr_field_id": "category", "type": "cdrfield", "value": "category"},
|
||||
{"tag":"Account", "cdr_field_id": "account", "type": "cdrfield", "value": "account"},
|
||||
{"tag":"Subject", "cdr_field_id": "subject", "type": "cdrfield", "value": "subject"},
|
||||
{"tag":"Destination", "cdr_field_id": "destination", "type": "cdrfield", "value": "destination"},
|
||||
{"tag":"SetupTime", "cdr_field_id": "setup_time", "type": "cdrfield", "value": "setup_time", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag":"AnswerTime", "cdr_field_id": "answer_time", "type": "cdrfield", "value": "answer_time", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag":"Usage", "cdr_field_id": "usage", "type": "cdrfield", "value": "usage"},
|
||||
{"tag":"Cost", "cdr_field_id": "cost", "type": "cdrfield", "value": "cost"},
|
||||
],
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
23
data/conf/samples/multifiles/b.json
Normal file
23
data/conf/samples/multifiles/b.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
// CGRateS Configuration file
|
||||
// Used in multifile configuration tests
|
||||
// Should be the second file loaded
|
||||
|
||||
"general": {
|
||||
"default_reqtype": "pseudoprepaid", // default request type to consider when missing from requests: <""|prepaid|postpaid|pseudoprepaid|rated>
|
||||
},
|
||||
|
||||
"cdre": {
|
||||
"*default": {
|
||||
"data_usage_multiply_factor": 1024, // multiply data usage before export (eg: convert from KBytes to Bytes)
|
||||
"export_dir": "/tmp/cgrates/cdre", // path where the exported CDRs will be placed
|
||||
},
|
||||
"export1": {
|
||||
"header_fields": [
|
||||
{"tag": "CgrId", "cdr_field_id": "cgrid", "type": "cdrfield", "value": "cgrid"},
|
||||
{"tag":"RunId", "cdr_field_id": "mediation_runid", "type": "cdrfield", "value": "mediation_runid"},
|
||||
], // template of the exported header fields
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
23
data/conf/samples/multifiles/c.json
Normal file
23
data/conf/samples/multifiles/c.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
// CGRateS Configuration file
|
||||
// Used in multifile configuration tests
|
||||
// Should be the third file loaded
|
||||
|
||||
"cdre": {
|
||||
"export1": {
|
||||
"cost_rounding_decimals": 1, // rounding decimals for Cost values. -1 to disable rounding
|
||||
"content_fields": [ // template of the exported content fields
|
||||
{"tag":"Tenant", "cdr_field_id": "tenant", "type": "cdrfield", "value": "tenant"},
|
||||
{"tag":"Category", "cdr_field_id": "category", "type": "cdrfield", "value": "category"},
|
||||
{"tag":"Account", "cdr_field_id": "account", "type": "cdrfield", "value": "account"},
|
||||
{"tag":"Subject", "cdr_field_id": "subject", "type": "cdrfield", "value": "subject"},
|
||||
{"tag":"Destination", "cdr_field_id": "destination", "type": "cdrfield", "value": "destination"},
|
||||
{"tag":"SetupTime", "cdr_field_id": "setup_time", "type": "cdrfield", "value": "setup_time", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag":"AnswerTime", "cdr_field_id": "answer_time", "type": "cdrfield", "value": "answer_time", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag":"Usage", "cdr_field_id": "usage", "type": "cdrfield", "value": "usage"},
|
||||
{"tag":"Cost", "cdr_field_id": "cost", "type": "cdrfield", "value": "cost"},
|
||||
], // template of the exported header fields
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
@@ -28,4 +28,8 @@
|
||||
"cdrstats": "internal",
|
||||
},
|
||||
|
||||
"cdrstats": {
|
||||
"enabled": true, // starts the cdrstats service: <true|false>
|
||||
},
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user