diff --git a/cgrates.json b/cgrates.json index ce5d5b1..6858467 100644 --- a/cgrates.json +++ b/cgrates.json @@ -82,23 +82,23 @@ }, "request_processors": [ { - "id": "AuthPAP", + "id": "Authorization", "filters": ["*string:~*vars.*radReqType:*radAuth"], - "flags": ["*radauth", "*pap", "*log"], + "flags": ["*authorize", "*attributes", "*log"], "request_fields": [ - {"tag": "UserPassword", "path": "*vars.UserPassword", "type": "*constant", - "value": "test"} + {"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "data"}, + {"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} ], "reply_fields": [ - {"tag": "RemoveOnError", "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"} + {"tag": "SessionTimeout", "path": "*rep.Session-Timeout", "type": "*constant", "value": "3600"}, + {"tag": "AcctInterimInterval", "path": "*rep.Acct-Interim-Interval", "type": "*constant", "value": "30"} ] } ]