Files
cgrates/data/conf/samples/radagent_internal/cgrates.json
2020-01-21 17:54:43 +02:00

161 lines
5.3 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": {
"db_type": "*internal",
},
"stor_db": {
"db_type": "*internal",
},
"rals": {
"enabled": true,
},
"schedulers": {
"enabled": true,
},
"cdrs": {
"enabled": true,
"rals_conns": ["*internal"],
},
"resources": {
"enabled": true,
"store_interval": "-1",
},
"attributes": {
"enabled": true,
},
"suppliers": {
"enabled": true,
},
"chargers": {
"enabled": true,
},
"sessions": {
"enabled": true,
"attributes_conns": ["*localhost"],
"cdrs_conns": ["*localhost"],
"rals_conns": ["*localhost"],
"resources_conns": ["*localhost"],
"chargers_conns": ["*internal"],
"debit_interval": "10s",
},
"radius_agent": {
"enabled": true,
"sessions_conns": ["*localhost"],
"request_processors": [
{
"id": "KamailioAuth",
"filters": ["*string:~*vars.*radReqType:*radAuth"],
"flags": ["*auth", "*accounts"],
"request_fields":[
{"tag": "Category", "field_id": "Category", "type": "*constant", "value": "call"},
{"tag": "RequestType", "field_id": "RequestType", "type": "*constant",
"value": "*prepaid", "mandatory": true},
{"tag": "OriginID", "field_id": "OriginID", "type": "*composed",
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag", "mandatory": true},
{"tag": "Account", "field_id": "Account", "type": "*composed",
"value": "~*req.User-Name", "mandatory": true},
{"tag": "Subject", "field_id": "Subject", "type": "*variable",
"value": "~*req.User-Name", "mandatory": true},
{"tag": "Destination", "field_id": "Destination", "type": "*composed",
"value": "~*req.Called-Station-Id", "mandatory": true},
{"tag": "SetupTime", "field_id": "SetupTime", "type": "*composed",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "field_id": "AnswerTime", "type": "*composed",
"value": "~*req.Event-Timestamp", "mandatory": true},
],
"reply_fields":[
{"tag": "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"],
"request_fields":[
{"tag": "Category", "field_id": "Category", "type": "*constant", "value": "call"},
{"tag": "RequestType", "field_id": "RequestType", "type": "*constant",
"value": "*prepaid", "mandatory": true},
{"tag": "OriginID", "field_id": "OriginID", "type": "*composed",
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
{"tag": "OriginHost", "field_id": "OriginHost", "type": "*composed",
"value": "~*req.NAS-IP-Address", "mandatory": true},
{"tag": "Account", "field_id": "Account", "type": "*composed",
"value": "~*req.User-Name", "mandatory": true},
{"tag": "Subject", "field_id": "Subject", "type": "*variable",
"value": "~*req.User-Name", "mandatory": true},
{"tag": "Destination", "field_id": "Destination", "type": "*composed",
"value": "~*req.Called-Station-Id", "mandatory": true},
{"tag": "SetupTime", "field_id": "SetupTime", "type": "*composed",
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
{"tag": "AnswerTime", "field_id": "AnswerTime", "type": "*composed",
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
{"tag": "RemoteAddr" , "field_id": "RemoteAddr", "type": "*remote_host"},
],
"reply_fields":[],
},
{
"id": "KamailioAccountingStop",
"filters": ["*string:~*req.Acct-Status-Type:Stop"],
"flags": ["*terminate", "*resources", "*accounts", "*cdrs"],
"request_fields":[
{"tag": "Category", "field_id": "Category", "type": "*constant", "value": "call"},
{"tag": "RequestType", "field_id": "RequestType", "type": "*constant",
"value": "*prepaid", "mandatory": true},
{"tag": "OriginID", "field_id": "OriginID", "type": "*composed",
"value": "~*req.Acct-Session-Id;-;~*req.Sip-From-Tag;-;~*req.Sip-To-Tag", "mandatory": true},
{"tag": "OriginHost", "field_id": "OriginHost", "type": "*composed",
"value": "~*req.NAS-IP-Address", "mandatory": true},
{"tag": "Account", "field_id": "Account", "type": "*composed",
"value": "~*req.User-Name", "mandatory": true},
{"tag": "Subject", "field_id": "Subject", "type": "*variable",
"value": "~*req.User-Name", "mandatory": true},
{"tag": "Destination", "field_id": "Destination", "type": "*composed",
"value": "~*req.Called-Station-Id", "mandatory": true},
{"tag": "SetupTime", "field_id": "SetupTime", "type": "*composed",
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
{"tag": "AnswerTime", "field_id": "AnswerTime", "type": "*composed",
"value": "~*req.Ascend-User-Acct-Time", "mandatory": true},
{"tag": "Usage", "field_id": "Usage", "type": "*usage_difference",
"value": "~*req.Event-Timestamp;~*req.Ascend-User-Acct-Time", "mandatory": true},
{"tag": "RemoteAddr" , "field_id": "RemoteAddr", "type": "*remote_host"},
],
"reply_fields":[],
},
],
},
"apier": {
"scheduler_conns": ["*internal"],
},
}