mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-25 09:08:45 +05:00
Updated SetRateProfile + drivers and tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
3baadf5549
commit
28619db53d
634
data/conf/samples/ees_ooma/cgrates.json
Normal file
634
data/conf/samples/ees_ooma/cgrates.json
Normal file
@@ -0,0 +1,634 @@
|
||||
{
|
||||
// Sample CGRateS Configuration file for EEs
|
||||
//
|
||||
// Copyright (C) ITsysCOM GmbH
|
||||
|
||||
"general": {
|
||||
"log_level": 7,
|
||||
},
|
||||
|
||||
"listen": {
|
||||
"rpc_json": ":2012",
|
||||
"rpc_gob": ":2013",
|
||||
"http": ":2080",
|
||||
},
|
||||
|
||||
"data_db": {
|
||||
"db_type": "redis",
|
||||
"db_port": 6379,
|
||||
"db_name": "10",
|
||||
},
|
||||
|
||||
|
||||
"stor_db": {
|
||||
"db_password": "CGRateS.org",
|
||||
},
|
||||
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
|
||||
"schedulers": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
|
||||
"cdrs": {
|
||||
"enabled": true,
|
||||
"chargers_conns": ["*localhost"],
|
||||
"rals_conns": ["*internal"],
|
||||
"session_cost_retries": 0,
|
||||
},
|
||||
|
||||
|
||||
"chargers": {
|
||||
"enabled": true,
|
||||
"attributes_conns": ["*internal"],
|
||||
},
|
||||
|
||||
|
||||
"attributes": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
|
||||
"ees": {
|
||||
"attributes_conns": [],
|
||||
"cache": {
|
||||
"*file_csv": {
|
||||
"limit": -1,
|
||||
"static_ttl": false,
|
||||
"ttl": "5s"
|
||||
},
|
||||
"*sql": {
|
||||
"limit": -1,
|
||||
"static_ttl": false,
|
||||
"ttl": "1h"
|
||||
}
|
||||
},
|
||||
"enabled": true,
|
||||
"exporters": [
|
||||
{
|
||||
"attempts": 2,
|
||||
"attribute_context": "",
|
||||
"attribute_ids": [],
|
||||
"export_path": "mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
||||
"fields": [
|
||||
{
|
||||
"tag": "RequiredTemplate",
|
||||
"type": "*template",
|
||||
"value": "requiredFields"
|
||||
}
|
||||
],
|
||||
"filters": [
|
||||
"*prefix:~*req.SetupTime:2022-02"
|
||||
],
|
||||
"flags": [],
|
||||
"id": "monthly_cdrs_1",
|
||||
"opts": {
|
||||
"sqlConnMaxLifetime": "0",
|
||||
"sqlDBName": "cgrates2",
|
||||
"sqlMaxIdleConns": 10,
|
||||
"sqlMaxOpenConns": 100,
|
||||
"sqlTableName": "cdrs",
|
||||
"sslMode": "disable"
|
||||
},
|
||||
"tenant": "",
|
||||
"timezone": "",
|
||||
"type": "*sql"
|
||||
},
|
||||
{
|
||||
"attempts": 2,
|
||||
"attribute_context": "",
|
||||
"attribute_ids": [],
|
||||
"export_path": "mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
||||
"fields": [
|
||||
{
|
||||
"tag": "RequiredTemplate",
|
||||
"type": "*template",
|
||||
"value": "requiredFields"
|
||||
}
|
||||
],
|
||||
"filters": [
|
||||
"*prefix:~*req.SetupTime:2022-03"
|
||||
],
|
||||
"flags": [],
|
||||
"id": "monthly_cdrs_2",
|
||||
"opts": {
|
||||
"sqlConnMaxLifetime": "0",
|
||||
"sqlDBName": "cgrates2",
|
||||
"sqlMaxIdleConns": 10,
|
||||
"sqlMaxOpenConns": 100,
|
||||
"sqlTableName": "cdrs",
|
||||
"sslMode": "disable"
|
||||
},
|
||||
"tenant": "",
|
||||
"timezone": "",
|
||||
"type": "*sql"
|
||||
},
|
||||
{
|
||||
"attempts": 2,
|
||||
"attribute_context": "",
|
||||
"attribute_ids": [],
|
||||
"export_path": "mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
||||
"fields": [
|
||||
{
|
||||
"tag": "RequiredTemplate",
|
||||
"type": "*template",
|
||||
"value": "requiredFields"
|
||||
}
|
||||
],
|
||||
"filters": [
|
||||
"*prefix:~*req.SetupTime:2022-04"
|
||||
],
|
||||
"flags": [],
|
||||
"id": "monthly_cdrs_3",
|
||||
"opts": {
|
||||
"sqlConnMaxLifetime": "0",
|
||||
"sqlDBName": "cgrates2",
|
||||
"sqlMaxIdleConns": 10,
|
||||
"sqlMaxOpenConns": 100,
|
||||
"sqlTableName": "cdrs",
|
||||
"sslMode": "disable"
|
||||
},
|
||||
"tenant": "",
|
||||
"timezone": "",
|
||||
"type": "*sql"
|
||||
},
|
||||
{
|
||||
"attempts": 2,
|
||||
"attribute_context": "",
|
||||
"attribute_ids": [],
|
||||
"export_path": "mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
||||
"fields": [
|
||||
{
|
||||
"tag": "RequiredTemplate",
|
||||
"type": "*template",
|
||||
"value": "requiredFields"
|
||||
}
|
||||
],
|
||||
"filters": [
|
||||
"*prefix:~*req.SetupTime:2022-05"
|
||||
],
|
||||
"flags": [],
|
||||
"id": "monthly_cdrs_4",
|
||||
"opts": {
|
||||
"sqlConnMaxLifetime": "0",
|
||||
"sqlDBName": "cgrates2",
|
||||
"sqlMaxIdleConns": 10,
|
||||
"sqlMaxOpenConns": 100,
|
||||
"sqlTableName": "cdrs",
|
||||
"sslMode": "disable"
|
||||
},
|
||||
"tenant": "",
|
||||
"timezone": "",
|
||||
"type": "*sql"
|
||||
},
|
||||
{
|
||||
"attempts": 2,
|
||||
"attribute_context": "",
|
||||
"attribute_ids": [],
|
||||
"export_path": "mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
||||
"fields": [
|
||||
{
|
||||
"tag": "RequiredTemplate",
|
||||
"type": "*template",
|
||||
"value": "requiredFields"
|
||||
}
|
||||
],
|
||||
"filters": [
|
||||
"*prefix:~*req.SetupTime:2022-06"
|
||||
],
|
||||
"flags": [],
|
||||
"id": "monthly_cdrs_5",
|
||||
"opts": {
|
||||
"sqlConnMaxLifetime": "0",
|
||||
"sqlDBName": "cgrates2",
|
||||
"sqlMaxIdleConns": 10,
|
||||
"sqlMaxOpenConns": 100,
|
||||
"sqlTableName": "cdrs",
|
||||
"sslMode": "disable"
|
||||
},
|
||||
"tenant": "",
|
||||
"timezone": "",
|
||||
"type": "*sql"
|
||||
},
|
||||
{
|
||||
"attempts": 2,
|
||||
"attribute_context": "",
|
||||
"attribute_ids": [],
|
||||
"export_path": "mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
||||
"fields": [
|
||||
{
|
||||
"tag": "RequiredTemplate",
|
||||
"type": "*template",
|
||||
"value": "requiredFields"
|
||||
}
|
||||
],
|
||||
"filters": [
|
||||
"*prefix:~*req.SetupTime:2022-07"
|
||||
],
|
||||
"flags": [],
|
||||
"id": "monthly_cdrs_6",
|
||||
"opts": {
|
||||
"sqlConnMaxLifetime": "0",
|
||||
"sqlDBName": "cgrates2",
|
||||
"sqlMaxIdleConns": 10,
|
||||
"sqlMaxOpenConns": 100,
|
||||
"sqlTableName": "cdrs",
|
||||
"sslMode": "disable"
|
||||
},
|
||||
"tenant": "",
|
||||
"timezone": "",
|
||||
"type": "*sql"
|
||||
},
|
||||
{
|
||||
"attempts": 2,
|
||||
"attribute_context": "",
|
||||
"attribute_ids": [],
|
||||
"export_path": "mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
||||
"fields": [
|
||||
{
|
||||
"tag": "RequiredTemplate",
|
||||
"type": "*template",
|
||||
"value": "requiredFields"
|
||||
}
|
||||
],
|
||||
"filters": [
|
||||
"*prefix:~*req.SetupTime:2022-08"
|
||||
],
|
||||
"flags": [],
|
||||
"id": "monthly_cdrs_7",
|
||||
"opts": {
|
||||
"sqlConnMaxLifetime": "0",
|
||||
"sqlDBName": "cgrates2",
|
||||
"sqlMaxIdleConns": 10,
|
||||
"sqlMaxOpenConns": 100,
|
||||
"sqlTableName": "cdrs",
|
||||
"sslMode": "disable"
|
||||
},
|
||||
"tenant": "",
|
||||
"timezone": "",
|
||||
"type": "*sql"
|
||||
},
|
||||
{
|
||||
"attempts": 2,
|
||||
"attribute_context": "",
|
||||
"attribute_ids": [],
|
||||
"export_path": "mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
||||
"fields": [
|
||||
{
|
||||
"tag": "RequiredTemplate",
|
||||
"type": "*template",
|
||||
"value": "requiredFields"
|
||||
}
|
||||
],
|
||||
"filters": [
|
||||
"*prefix:~*req.SetupTime:2022-09"
|
||||
],
|
||||
"flags": [],
|
||||
"id": "monthly_cdrs_8",
|
||||
"opts": {
|
||||
"sqlConnMaxLifetime": "0",
|
||||
"sqlDBName": "cgrates2",
|
||||
"sqlMaxIdleConns": 10,
|
||||
"sqlMaxOpenConns": 100,
|
||||
"sqlTableName": "cdrs",
|
||||
"sslMode": "disable"
|
||||
},
|
||||
"tenant": "",
|
||||
"timezone": "",
|
||||
"type": "*sql"
|
||||
},
|
||||
{
|
||||
"attempts": 2,
|
||||
"attribute_context": "",
|
||||
"attribute_ids": [],
|
||||
"export_path": "mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
||||
"fields": [
|
||||
{
|
||||
"tag": "RequiredTemplate",
|
||||
"type": "*template",
|
||||
"value": "requiredFields"
|
||||
}
|
||||
],
|
||||
"filters": [
|
||||
"*prefix:~*req.SetupTime:2022-10"
|
||||
],
|
||||
"flags": [],
|
||||
"id": "monthly_cdrs_9",
|
||||
"opts": {
|
||||
"sqlConnMaxLifetime": "0",
|
||||
"sqlDBName": "cgrates2",
|
||||
"sqlMaxIdleConns": 10,
|
||||
"sqlMaxOpenConns": 100,
|
||||
"sqlTableName": "cdrs",
|
||||
"sslMode": "disable"
|
||||
},
|
||||
"tenant": "",
|
||||
"timezone": "",
|
||||
"type": "*sql"
|
||||
},
|
||||
{
|
||||
"attempts": 2,
|
||||
"attribute_context": "",
|
||||
"attribute_ids": [],
|
||||
"export_path": "mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
||||
"fields": [
|
||||
{
|
||||
"tag": "RequiredTemplate",
|
||||
"type": "*template",
|
||||
"value": "requiredFields"
|
||||
}
|
||||
],
|
||||
"filters": [
|
||||
"*prefix:~*req.SetupTime:2022-11"
|
||||
],
|
||||
"flags": [],
|
||||
"id": "monthly_cdrs_10",
|
||||
"opts": {
|
||||
"sqlConnMaxLifetime": "0",
|
||||
"sqlDBName": "cgrates2",
|
||||
"sqlMaxIdleConns": 10,
|
||||
"sqlMaxOpenConns": 100,
|
||||
"sqlTableName": "cdrs",
|
||||
"sslMode": "disable"
|
||||
},
|
||||
"tenant": "",
|
||||
"timezone": "",
|
||||
"type": "*sql"
|
||||
},
|
||||
{
|
||||
"attempts": 2,
|
||||
"attribute_context": "",
|
||||
"attribute_ids": [],
|
||||
"export_path": "mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
||||
"fields": [
|
||||
{
|
||||
"tag": "RequiredTemplate",
|
||||
"type": "*template",
|
||||
"value": "requiredFields"
|
||||
}
|
||||
],
|
||||
"filters": [
|
||||
"*prefix:~*req.SetupTime:2022-12"
|
||||
],
|
||||
"flags": [],
|
||||
"id": "monthly_cdrs_11",
|
||||
"opts": {
|
||||
"sqlConnMaxLifetime": "0",
|
||||
"sqlDBName": "cgrates2",
|
||||
"sqlMaxIdleConns": 10,
|
||||
"sqlMaxOpenConns": 100,
|
||||
"sqlTableName": "cdrs",
|
||||
"sslMode": "disable"
|
||||
},
|
||||
"tenant": "",
|
||||
"timezone": "",
|
||||
"type": "*sql"
|
||||
},
|
||||
{
|
||||
"attempts": 2,
|
||||
"attribute_context": "",
|
||||
"attribute_ids": [],
|
||||
"export_path": "mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
||||
"fields": [
|
||||
{
|
||||
"tag": "RequiredTemplate",
|
||||
"type": "*template",
|
||||
"value": "requiredFields"
|
||||
}
|
||||
],
|
||||
"filters": [
|
||||
"*prefix:~*req.SetupTime:2023-01"
|
||||
],
|
||||
"flags": [],
|
||||
"id": "monthly_cdrs_12",
|
||||
"opts": {
|
||||
"sqlConnMaxLifetime": "0",
|
||||
"sqlDBName": "cgrates2",
|
||||
"sqlMaxIdleConns": 10,
|
||||
"sqlMaxOpenConns": 100,
|
||||
"sqlTableName": "cdrs",
|
||||
"sslMode": "disable"
|
||||
},
|
||||
"tenant": "",
|
||||
"timezone": "",
|
||||
"type": "*sql"
|
||||
},
|
||||
{
|
||||
"attempts": 2,
|
||||
"attribute_context": "",
|
||||
"attribute_ids": [],
|
||||
"export_path": "mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
||||
"fields": [
|
||||
{
|
||||
"tag": "RequiredTemplate",
|
||||
"type": "*template",
|
||||
"value": "requiredFields"
|
||||
}
|
||||
],
|
||||
"filters": [
|
||||
"*prefix:~*req.SetupTime:2023-02"
|
||||
],
|
||||
"flags": [],
|
||||
"id": "monthly_cdrs_13",
|
||||
"opts": {
|
||||
"sqlConnMaxLifetime": "0",
|
||||
"sqlDBName": "cgrates2",
|
||||
"sqlMaxIdleConns": 10,
|
||||
"sqlMaxOpenConns": 100,
|
||||
"sqlTableName": "cdrs",
|
||||
"sslMode": "disable"
|
||||
},
|
||||
"tenant": "",
|
||||
"timezone": "",
|
||||
"type": "*sql"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
"apiers": {
|
||||
"enabled": true,
|
||||
"scheduler_conns": ["*internal"],
|
||||
},
|
||||
|
||||
|
||||
"templates": {
|
||||
"requiredFields": [
|
||||
{
|
||||
"path": "*exp.cgrid",
|
||||
"tag": "cgrid",
|
||||
"type": "*variable",
|
||||
"value": "~*req.CGRID"
|
||||
},
|
||||
{
|
||||
"path": "*exp.run_id",
|
||||
"tag": "run_id",
|
||||
"type": "*variable",
|
||||
"value": "~*req.RunID"
|
||||
},
|
||||
{
|
||||
"path": "*exp.origin_host",
|
||||
"tag": "origin_host",
|
||||
"type": "*variable",
|
||||
"value": "~*req.OriginHost"
|
||||
},
|
||||
{
|
||||
"path": "*exp.source",
|
||||
"tag": "source",
|
||||
"type": "*variable",
|
||||
"value": "~*req.Source"
|
||||
},
|
||||
{
|
||||
"path": "*exp.origin_id",
|
||||
"tag": "origin_id",
|
||||
"type": "*variable",
|
||||
"value": "~*req.OriginID"
|
||||
},
|
||||
{
|
||||
"path": "*exp.tor",
|
||||
"tag": "tor",
|
||||
"type": "*variable",
|
||||
"value": "~*req.ToR"
|
||||
},
|
||||
{
|
||||
"path": "*exp.request_type",
|
||||
"tag": "request_type",
|
||||
"type": "*variable",
|
||||
"value": "~*req.RequestType"
|
||||
},
|
||||
{
|
||||
"path": "*exp.tenant",
|
||||
"tag": "tenant",
|
||||
"type": "*variable",
|
||||
"value": "~*req.Tenant"
|
||||
},
|
||||
{
|
||||
"path": "*exp.category",
|
||||
"tag": "category",
|
||||
"type": "*variable",
|
||||
"value": "~*req.Category"
|
||||
},
|
||||
{
|
||||
"path": "*exp.account",
|
||||
"tag": "account",
|
||||
"type": "*variable",
|
||||
"value": "~*req.Account"
|
||||
},
|
||||
{
|
||||
"path": "*exp.subject",
|
||||
"tag": "subject",
|
||||
"type": "*variable",
|
||||
"value": "~*req.Subject"
|
||||
},
|
||||
{
|
||||
"path": "*exp.destination",
|
||||
"tag": "destination",
|
||||
"type": "*variable",
|
||||
"value": "~*req.Destination"
|
||||
},
|
||||
{
|
||||
"path": "*exp.setup_time",
|
||||
"tag": "setup_time",
|
||||
"type": "*variable",
|
||||
"value": "~*req.SetupTime"
|
||||
},
|
||||
{
|
||||
"path": "*exp.answer_time",
|
||||
"tag": "answer_time",
|
||||
"type": "*variable",
|
||||
"value": "~*req.AnswerTime"
|
||||
},
|
||||
{
|
||||
"path": "*exp.`usage`",
|
||||
"tag": "usage",
|
||||
"type": "*variable",
|
||||
"value": "~*req.Usage{*duration_nanoseconds}"
|
||||
},
|
||||
{
|
||||
"path": "*exp.cost_source",
|
||||
"tag": "cost_source",
|
||||
"type": "*variable",
|
||||
"value": "~*req.CostSource"
|
||||
},
|
||||
{
|
||||
"path": "*exp.cost",
|
||||
"tag": "cost",
|
||||
"type": "*variable",
|
||||
"value": "~*req.Cost"
|
||||
},
|
||||
{
|
||||
"path": "*exp.cost_details",
|
||||
"tag": "cost_details",
|
||||
"type": "*variable",
|
||||
"value": "~*req.CostDetails"
|
||||
},
|
||||
{
|
||||
"path": "*exp.extra_info",
|
||||
"tag": "extra_info",
|
||||
"type": "*variable",
|
||||
"value": "~*req.ExtraInfo"
|
||||
},
|
||||
{
|
||||
"path": "*exp.disconnect_cause",
|
||||
"tag": "disconnect_cause",
|
||||
"type": "*variable",
|
||||
"value": "~*req.DisconnectCause"
|
||||
},
|
||||
{
|
||||
"path": "*exp.route",
|
||||
"tag": "route",
|
||||
"type": "*variable",
|
||||
"value": "~*req.Route"
|
||||
},
|
||||
{
|
||||
"path": "*exp.caller_is_determined_in_areas",
|
||||
"tag": "caller_is_determined_in_areas",
|
||||
"type": "*variable",
|
||||
"value": "~*req.caller_is_determined_in_areas"
|
||||
},
|
||||
{
|
||||
"path": "*exp.caller_is_determined",
|
||||
"tag": "caller_is_determined",
|
||||
"type": "*variable",
|
||||
"value": "~*req.variable_caller_is_determined"
|
||||
},
|
||||
{
|
||||
"path": "*exp.origination",
|
||||
"tag": "origination",
|
||||
"type": "*variable",
|
||||
"value": "~*req.Account"
|
||||
},
|
||||
{
|
||||
"path": "*exp.e164_destination",
|
||||
"tag": "e164_destination",
|
||||
"type": "*variable",
|
||||
"value": "~*req.variable_e164_destination"
|
||||
},
|
||||
{
|
||||
"path": "*exp.rn_destination",
|
||||
"tag": "rn_destination",
|
||||
"type": "*variable",
|
||||
"value": "~*req.variable_rn_destination"
|
||||
},
|
||||
{
|
||||
"path": "*exp.original_destination",
|
||||
"tag": "original_destination",
|
||||
"type": "*variable",
|
||||
"value": "~*req.variable_original_destination"
|
||||
},
|
||||
{
|
||||
"path": "*exp.original_account",
|
||||
"tag": "original_account",
|
||||
"type": "*variable",
|
||||
"value": "~*req.variable_original_account"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
@@ -13,9 +13,6 @@
|
||||
"db_name": "10",
|
||||
"db_port": 27017,
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
"sessions": {
|
||||
"enabled": true,
|
||||
|
||||
Reference in New Issue
Block a user