"request_processors": [
{
"id": "VoiceInit",
"filters": ["*string:*vars.*cmd:CCR", "*string:*req.CC-Request-Type:1"],
"flags": ["*initiate", "*accounts", "*attributes", "*log"],
"request_fields":[
{"tag": "TOR", "field_id": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "OriginID", "field_id": "OriginID", "type": "*composed", "value": "~*req.Service-Information.IMS-Information.User-Session-Id", "mandatory": true},
{"tag": "OriginHost", "field_id": "OriginHost", "type": "*composed", "value": "~*req.Origin-Host", "mandatory": true},
{"tag": "RequestType", "field_id": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "field_id": "Category", "type": "*constant", "value": "call", "mandatory": true},
{"tag": "Account", "field_id": "Account", "type": "*composed", "value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
{"tag": "Subject", "field_id": "Subject", "type": "*composed", "value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
{"tag": "Destination", "field_id": "Destination", "type": "*composed", "value": "~*req.Service-Information.IMS-Information.Called-Party-Address:s/^tel:(.*)/$1/", "mandatory": true},
{"tag": "AnswerTime", "field_id": "AnswerTime", "type": "*composed", "value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "field_id": "Usage", "type": "*composed", "value": "~*req.Multiple-Services-Credit-Control.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "field_id": "SubscriberId", "type": "*composed", "value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
],
"reply_fields":[
{"tag": "SessionId", "field_id": "Session-Id", "type": "*composed",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"field_id": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "filters": ["*gt:*cgrep.MaxUsage{*duration_seconds}:0"],
"field_id": "Result-Code", "type": "*constant", "value": "2001"},
{"tag": "ResultCode", "filters": ["*lte:*cgrep.MaxUsage{*duration_seconds}:0"],
"field_id": "Result-Code", "type": "*constant", "value": "5031"},
{"tag": "OriginHost", "field_id": "Origin-Host", "type": "*composed",
"value": "~*vars.OriginHost", "mandatory": true},
{"tag": "OriginRealm", "field_id": "Origin-Realm", "type": "*composed",
"value": "~*vars.OriginRealm", "mandatory": true},
{"tag": "AuthApplicationId", "field_id": "Auth-Application-Id", "type": "*composed",
"value": "~*vars.*appid", "mandatory": true},
{"tag": "CCRequestType", "field_id": "CC-Request-Type", "type": "*composed",
"value": "~*req.CC-Request-Type", "mandatory": true},
{"tag": "CCRequestNumber", "field_id": "CC-Request-Number", "type": "*composed",
"value": "~*req.CC-Request-Number", "mandatory": true},
{"tag": "GrantedUnits", "field_id": "Multiple-Services-Credit-Control.Granted-Service-Unit.CC-Time", "type": "*constant",
"value": "30"},
{"tag": "GrantedUnits", "filters": ["*gte:*cgrep.MaxUsage{*duration_seconds}:0","*string:~*vars.RequestType:*prepaid"], "field_id": "Multiple-Services-Credit-Control.Granted-Service-Unit.CC-Time", "type": "*composed",
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
{"tag": "ServiceId", "field_id": "Multiple-Services-Credit-Control.Service-Identifier", "type": "*constant",
"value": "0"},
{"tag": "RatingGroup", "field_id": "Multiple-Services-Credit-Control.Rating-Group", "type": "*constant",
"value": "0"},
],
},