Attributes.csv: Use *req.PasswordFromAttributes path (like oldtutorial) Config: Add PasswordFromAttributes field with *attributes marker Second processor reads from ~*cgrep.Attributes.PasswordFromAttributes This matches the exact pattern from CGRateS test configurations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
133 lines
3.7 KiB
JSON
133 lines
3.7 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": "redis",
|
|
"db_port": 6379,
|
|
"db_name": "10",
|
|
},
|
|
|
|
"stor_db": { // database used to store offline tariff plans and CDRs
|
|
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
|
},
|
|
"filters": {
|
|
"apiers_conns": ["*localhost"],
|
|
},
|
|
|
|
"rals": {
|
|
"enabled": true,
|
|
},
|
|
|
|
"schedulers": {
|
|
"enabled": true,
|
|
},
|
|
|
|
"cdrs": {
|
|
"enabled": true,
|
|
"rals_conns": ["*internal"],
|
|
},
|
|
|
|
"resources": {
|
|
"enabled": true,
|
|
},
|
|
|
|
"attributes": {
|
|
"enabled": true,
|
|
},
|
|
|
|
"routes": {
|
|
"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"],
|
|
"listeners":[
|
|
{
|
|
"network": "udp",
|
|
"auth_address": "0.0.0.0:1812",
|
|
"acct_address": "0.0.0.0:1813"
|
|
}
|
|
],
|
|
"client_secrets": {
|
|
"*default": "CGRateS.org"
|
|
},
|
|
"client_dictionaries": {
|
|
"*default": ["/usr/share/cgrates/radius/dict/"]
|
|
},
|
|
"request_processors": [
|
|
{
|
|
"id": "CGRPAPAuth",
|
|
"filters": ["*string:~*vars.*radReqType:*radAuth"],
|
|
"flags": ["*authorize", "*attributes", "*accounts", "*continue", "*log"],
|
|
"request_fields": [
|
|
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
|
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid", "mandatory": true},
|
|
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.Acct-Session-Id", "mandatory": true},
|
|
{"tag": "Account", "path": "*cgreq.Account", "type": "*composed", "value": "~*req.User-Name", "mandatory": true},
|
|
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*composed", "value": "~*req.User-Name", "mandatory": true},
|
|
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "*any", "mandatory": true},
|
|
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*composed", "value": "~*req.Event-Timestamp;*now", "mandatory": true},
|
|
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*composed", "value": "~*req.Event-Timestamp;*now", "mandatory": true},
|
|
{"tag": "PasswordFromAttributes", "path": "*cgreq.PasswordFromAttributes", "type": "*constant", "value": "*attributes"}
|
|
],
|
|
"reply_fields": []
|
|
},
|
|
{
|
|
"id": "RadiusPAPAuthProcessor",
|
|
"filters": ["*string:~*vars.*radReqType:*radAuth"],
|
|
"flags": ["*radauth", "*pap", "*log"],
|
|
"request_fields": [
|
|
{"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*variable",
|
|
"value": "~*cgrep.Attributes.PasswordFromAttributes"}
|
|
],
|
|
"reply_fields": [
|
|
{"tag": "RemoveAddedFields", "filters": ["*notempty:~*cgrep.Error:"], "type": "*removeall", "path": "*rep"},
|
|
{"tag": "Code", "path": "*rep.*radReplyCode", "filters": ["*notempty:~*cgrep.Error:"],
|
|
"type": "*constant", "value": "AccessReject"},
|
|
{"tag": "ReplyMessage", "path": "*rep.Reply-Message", "filters": ["*notempty:~*cgrep.Error:"],
|
|
"type": "*variable", "value": "~*cgrep.Error"},
|
|
{"tag": "SessionTimeout", "path": "*rep.Session-Timeout", "filters": ["*empty:~*cgrep.Error:"],
|
|
"type": "*constant", "value": "3600"},
|
|
{"tag": "AcctInterimInterval", "path": "*rep.Acct-Interim-Interval", "filters": ["*empty:~*cgrep.Error:"],
|
|
"type": "*constant", "value": "30"}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
|
|
|
|
|
|
"apiers": {
|
|
"enabled": true,
|
|
"scheduler_conns": ["*internal"],
|
|
},
|
|
|
|
}
|
|
|