mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
158 lines
5.1 KiB
JSON
158 lines
5.1 KiB
JSON
{
|
|
// CGRateS Configuration file
|
|
//
|
|
|
|
"general": {
|
|
"log_level": 7,
|
|
},
|
|
|
|
|
|
"listen": {
|
|
"rpc_json": ":2012", // RPC JSON listening address
|
|
"rpc_gob": ":2013", // RPC GOB listening address
|
|
"http": ":2080", // HTTP listening address
|
|
},
|
|
|
|
"data_db": { // database used to store runtime data (eg: accounts, cdr stats)
|
|
"db_type": "mongo", // stor database type to use: <mysql|postgres>
|
|
"db_port": 27017, // the port to reach the stordb
|
|
"db_name": "datadb",
|
|
"db_password": "",
|
|
},
|
|
|
|
"stor_db": {
|
|
"db_type": "mongo", // stor database type to use: <mysql|postgres>
|
|
"db_port": 27017, // the port to reach the stordb
|
|
"db_name": "stordb",
|
|
"db_password": "",
|
|
},
|
|
|
|
"rals": {
|
|
"enabled": true,
|
|
},
|
|
|
|
"scheduler": {
|
|
"enabled": true,
|
|
},
|
|
|
|
"cdrs": {
|
|
"enabled": true,
|
|
"rals_conns": [
|
|
{"address": "*internal"}
|
|
],
|
|
},
|
|
|
|
"resources": {
|
|
"enabled": true,
|
|
},
|
|
|
|
"attributes": {
|
|
"enabled": true,
|
|
},
|
|
|
|
"suppliers": {
|
|
"enabled": true,
|
|
},
|
|
|
|
"sessions": {
|
|
"enabled": true,
|
|
"attributes_conns": [
|
|
{"address": "127.0.0.1:2012", "transport": "*json"}
|
|
],
|
|
"cdrs_conns": [
|
|
{"address": "127.0.0.1:2012", "transport": "*json"}
|
|
],
|
|
"rals_conns": [
|
|
{"address": "127.0.0.1:2012", "transport": "*json"}
|
|
],
|
|
"resources_conns": [
|
|
{"address": "127.0.0.1:2012", "transport": "*json"}
|
|
],
|
|
"debit_interval": "10s",
|
|
},
|
|
|
|
"radius_agent": {
|
|
"enabled": true,
|
|
"sessions_conns": [
|
|
{"address": "127.0.0.1:2012", "transport": "*json"} // connection towards SMG component for session management
|
|
],
|
|
"request_processors": [
|
|
{
|
|
"id": "KamailioAuth",
|
|
"filters": ["*string:*vars.*radReqType:*radAuth"],
|
|
"flags": ["*auth", "*accounts",],
|
|
"continue_on_success": false,
|
|
"request_fields":[
|
|
{"id": "RequestType", "field_id": "RequestType", "type": "*constant",
|
|
"value": "*prepaid", "mandatory": true},
|
|
{"id": "OriginID", "field_id": "OriginID", "type": "*composed",
|
|
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
|
|
{"id": "Account", "field_id": "Account", "type": "*composed",
|
|
"value": "~*req.User-Name", "mandatory": true},
|
|
{"id": "Destination", "field_id": "Destination", "type": "*composed",
|
|
"value": "~*req.Called-Station-Id", "mandatory": true},
|
|
{"id": "SetupTime", "field_id": "SetupTime", "type": "*composed",
|
|
"value": "~*req.Event-Timestamp", "mandatory": true},
|
|
{"id": "AnswerTime", "field_id": "AnswerTime", "type": "*composed",
|
|
"value": "~*req.Event-Timestamp", "mandatory": true},
|
|
],
|
|
"reply_fields":[
|
|
{"id": "MaxUsage", "field_id": "SIP-AVP", "type": "*composed",
|
|
"value": "session_max_time#;~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
|
],
|
|
},
|
|
{
|
|
"id": "KamailioAccountingStart",
|
|
"filters": ["*string:*req.Acct-Status-Type:Start"],
|
|
"flags": ["*initiate","*attributes","*resources","*accounts"],
|
|
"continue_on_success": false,
|
|
"request_fields":[
|
|
{"id": "RequestType", "field_id": "RequestType", "type": "*constant",
|
|
"value": "*prepaid", "mandatory": true},
|
|
{"id": "OriginID", "field_id": "OriginID", "type": "*composed",
|
|
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
|
{"id": "OriginHost", "field_id": "OriginHost", "type": "*composed",
|
|
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
|
{"id": "Account", "field_id": "Account", "type": "*composed",
|
|
"value": "~*req.User-Name", "mandatory": true},
|
|
{"id": "Destination", "field_id": "Destination", "type": "*composed",
|
|
"value": "~*req.Called-Station-Id", "mandatory": true},
|
|
{"id": "SetupTime", "field_id": "SetupTime", "type": "*composed",
|
|
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
|
{"id": "AnswerTime", "field_id": "AnswerTime", "type": "*composed",
|
|
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
|
],
|
|
"reply_fields":[],
|
|
},
|
|
{
|
|
"id": "KamailioAccountingStop",
|
|
"filters": ["*string:*req.Acct-Status-Type:Stop"],
|
|
"flags": ["*terminate","*resources","*accounts","*cdrs"],
|
|
"continue_on_success": false,
|
|
"request_fields":[
|
|
{"id": "RequestType", "field_id": "RequestType", "type": "*constant",
|
|
"value": "*prepaid", "mandatory": true},
|
|
{"id": "OriginID", "field_id": "OriginID", "type": "*composed",
|
|
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
|
|
{"id": "OriginHost", "field_id": "OriginHost", "type": "*composed",
|
|
"value": "~*req.NAS-IP-Address", "mandatory": true},
|
|
{"id": "Account", "field_id": "Account", "type": "*composed",
|
|
"value": "~*req.User-Name", "mandatory": true},
|
|
{"id": "Destination", "field_id": "Destination", "type": "*composed",
|
|
"value": "~*req.Called-Station-Id", "mandatory": true},
|
|
{"id": "SetupTime", "field_id": "SetupTime", "type": "*composed",
|
|
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
|
{"id": "AnswerTime", "field_id": "AnswerTime", "type": "*composed",
|
|
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
|
|
{"id": "Usage", "field_id": "Usage", "type": "*usage_difference",
|
|
"value": "~*req.Event-Timestamp;~*req.Ascend-User-Acct-Time", "mandatory": true},
|
|
],
|
|
"reply_fields":[],
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}
|