Update DiamIntegration test for all configurations

This commit is contained in:
TeoV
2020-02-05 11:12:37 +02:00
committed by Dan Christian Bogos
parent 0bfec9defe
commit d396051d77
37 changed files with 2609 additions and 1119 deletions

View File

@@ -50,6 +50,7 @@ func NewAgentRequest(req config.DataProvider,
Request: req,
Vars: config.NewNavigableMap(vars),
CGRRequest: config.NewNavigableMap(nil),
diamreq: config.NewNavigableMap(nil), // special case when CGRateS is building the request
CGRReply: cgrRply,
Reply: rply,
Timezone: timezone,
@@ -109,6 +110,8 @@ func (ar *AgentRequest) FieldAsInterface(fldPath []string) (val interface{}, err
val, err = ar.CGRRequest.GetField(fldPath[1:])
case utils.MetaCgrep:
val, err = ar.CGRReply.GetField(fldPath[1:])
case utils.MetaDiamreq:
val, err = ar.diamreq.FieldAsInterface(fldPath[1:])
case utils.MetaRep:
val, err = ar.Reply.GetField(fldPath[1:])
case utils.MetaHdr:
@@ -188,9 +191,6 @@ func (ar *AgentRequest) SetFields(tplFlds []*config.FCTemplate) (err error) {
case utils.MetaRep:
ar.Reply.Set(fldPath[1:], valSet, false, true)
case utils.MetaDiamreq:
if ar.diamreq == nil {
ar.diamreq = config.NewNavigableMap(nil) // special case when CGRateS is building the request
}
ar.diamreq.Set(fldPath[1:], valSet, false, true)
}
}

View File

@@ -15,43 +15,43 @@
"flags": ["*initiate", "*accounts"],
"request_fields":[
{
"tag": "ToR", "path": "ToR",
"tag": "ToR", "path": "*cgreq.ToR",
"type": "*constant", "value": "*data"
},
{
"tag": "OriginID", "path": "OriginID",
"tag": "OriginID", "path": "*cgreq.OriginID",
"type": "*variable", "mandatory": true,
"value": "~*req.Session-Id"
},
{
"tag": "RequestType", "path": "RequestType",
"tag": "RequestType", "path": "*cgreq.RequestType",
"type": "*constant", "value": "*prepaid"
},
{
"tag": "Category", "path": "Category",
"tag": "Category", "path": "*cgreq.Category",
"type": "*constant", "value": "data"
},
{
"tag": "Account", "path": "Account",
"tag": "Account", "path": "*cgreq.Account",
"type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(1)]"
},
{
"tag": "Destination", "path": "Destination",
"tag": "Destination", "path": "*cgreq.Destination",
"type": "*constant", "value": "data"
},
{
"tag": "SetupTime", "path": "SetupTime",
"tag": "SetupTime", "path": "*cgreq.SetupTime",
"type": "*variable", "mandatory": true,
"value": "~*req.Event-Timestamp"
},
{
"tag": "AnswerTime", "path": "AnswerTime",
"tag": "AnswerTime", "path": "*cgreq.AnswerTime",
"type": "*variable", "mandatory": true,
"value": "~*req.Event-Timestamp"
},
{
"tag": "Usage", "path": "Usage",
"tag": "Usage", "path": "*cgreq.Usage",
"type": "*constant", "value": "2048"
},
],
@@ -60,7 +60,7 @@
{
"tag": "ResultCodeError",
"filters": ["*notempty:~*cgrep.Error:"],
"path": "Result-Code", "blocker": true,
"path": "*rep.Result-Code", "blocker": true,
"type": "*constant", "value": "5030"
},
],
@@ -109,7 +109,7 @@
{
"tag": "ResultCodeError",
"filters": ["*notempty:~*cgrep.Error:"],
"path": "Result-Code", "blocker": true,
"path": "*rep.Result-Code", "blocker": true,
"type": "*constant", "value": "5030"
},
],
@@ -178,7 +178,7 @@
{
"tag": "ResultCodeError",
"filters": ["*notempty:~*cgrep.Error:"],
"path": "Result-Code", "blocker": true,
"path": "*rep.Result-Code", "blocker": true,
"type": "*constant", "value": "5030"
},
],

View File

@@ -13,58 +13,58 @@
"flags": ["*event", "*accounts", "*cdrs"],
"request_fields":[
{
"tag": "ToR", "path": "ToR",
"tag": "ToR", "path": "*cgreq.ToR",
"type": "*constant", "value": "*sms"
},
{
"tag": "OriginID", "path": "OriginID",
"tag": "OriginID", "path": "*cgreq.OriginID",
"type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Service-Identifier"
},
{
"tag": "OriginHost", "path": "OriginHost",
"tag": "OriginHost", "path": "*cgreq.OriginHost",
"type": "*variable", "value": "~*vars.OriginHost"
},
{
"tag": "Source", "path": "Source",
"tag": "Source", "path": "*cgreq.Source",
"type": "*constant", "mandatory": true,
"value": "DiameterAgent"
},
{
"tag": "RequestType", "path": "RequestType",
"tag": "RequestType", "path": "*cgreq.RequestType",
"type": "*constant", "value": "*prepaid"
},
{
"tag": "Category", "path": "Category",
"tag": "Category", "path": "*cgreq.Category",
"type": "*constant", "value": "sms"
},
{
"tag": "Account", "path": "Account",
"tag": "Account", "path": "*cgreq.Account",
"type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"
},
{
"tag": "Destination", "path": "Destination",
"tag": "Destination", "path": "*cgreq.Destination",
"type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.SMS-Information.Recipient-Info.Recipient-Address.Address-Data:s/^\\+49(\\d+)/int${1}/:s/^0049(\\d+)/int${1}/:s/^49(\\d+)/int${1}/:s/^00(\\d+)/+${1}/:s/^[\\+]?(\\d+)/int${1}/:s/int(\\d+)/+49${1}/"
},
{
"tag": "SetupTime", "path": "SetupTime",
"tag": "SetupTime", "path": "*cgreq.SetupTime",
"type": "*variable", "mandatory": true,
"value": "~*req.Event-Timestamp"
},
{
"tag": "AnswerTime", "path": "AnswerTime",
"tag": "AnswerTime", "path": "*cgreq.AnswerTime",
"type": "*variable", "mandatory": true,
"value": "~*req.Event-Timestamp"
},
{
"tag": "Usage", "path": "Usage",
"tag": "Usage", "path": "*cgreq.Usage",
"type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Requested-Service-Unit.CC-Service-Specific-Units"
},
{
"tag": "Originator-SCCP-Address", "path": "Originator-SCCP-Address",
"tag": "Originator-SCCP-Address", "path": "*cgreq.Originator-SCCP-Address",
"type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.SMS-Information.Originator-SCCP-Address"
},
@@ -72,13 +72,13 @@
"reply_fields":[
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{
"tag": "ResultCode","path": "Result-Code",
"tag": "ResultCode","path": "*rep.Result-Code",
"filters": ["*eq:~*cgrep.MaxUsage:0"],
"type": "*constant", "value": "4012",
"blocker": true
},
{
"tag": "ResultCode", "path": "Result-Code",
"tag": "ResultCode", "path": "*rep.Result-Code",
"filters": ["*notempty:~*cgrep.Error:"],
"type": "*constant", "value": "5030",
"blocker": true

View File

@@ -11,43 +11,43 @@
],
"flags": ["*auth", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice"},
{
"tag": "OriginID", "path": "OriginID",
"tag": "OriginID", "path": "*cgreq.OriginID",
"type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.IMS-Information.User-Session-Id"
},
{
"tag": "OriginHost", "path": "OriginHost",
"tag": "OriginHost", "path": "*cgreq.OriginHost",
"type": "*variable", "mandatory": true,
"value": "~*vars.OriginHost"
},
{
"tag": "Source", "path": "Source",
"tag": "Source", "path": "*cgreq.Source",
"type": "*constant", "value": "DiameterAgent"
},
{
"tag": "RequestType", "path": "RequestType",
"tag": "RequestType", "path": "*cgreq.RequestType",
"type": "*constant", "value": "*prepaid"
},
{
"tag": "Account", "path": "Account",
"tag": "Account", "path": "*cgreq.Account",
"type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.IMS-Information.Calling-Party-Address[0]:s/tel:\\+(\\d+)/${1}/"
},
{
"tag": "Account", "path": "Account",
"tag": "Account", "path": "*cgreq.Account",
"filters":["*string:~*req.Service-Information.IMS-Information.Role-Of-Node:2"],
"type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.IMS-Information.Requested-Party-Address:s/tel:(\\+?\\d+)/${1}/:s/sip:(\\+?\\d+)/${1}/:s/^\\+49(\\d+)/int${1}/:s/^0049(\\d+)/int${1}/:s/^49(\\d+)/int${1}/:s/^00(\\d+)/+${1}/:s/^[\\+]?(\\d+)/int${1}/:s/int(\\d+)/49${1}/"
},
{
"tag": "Destination", "path": "Destination",
"tag": "Destination", "path": "*cgreq.Destination",
"type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.IMS-Information.Called-Party-Address:s/tel:(\\+?\\d+)/${1}/:s/^\\+49(\\d+)/int${1}/:s/^0049(\\d+)/int${1}/:s/^49(\\d+)/int${1}/:s/^00(\\d+)/+${1}/:s/^[\\+]?(\\d+)/int${1}/:s/int(\\d+)/+49${1}/"
},
{
"tag": "Destination", "path": "Destination",
"tag": "Destination", "path": "*cgreq.Destination",
"filters": [
"*prefix:~*req.Service-Information.IMS-Information.Called-Party-Address:tel:+",
"*notprefix:~*req.Service-Information.IMS-Information.Called-Party-Address:tel:+49"
@@ -56,23 +56,23 @@
"value": "~*req.Service-Information.IMS-Information.Called-Party-Address:s/tel:(\\+?\\d+)/${1}/:s/^\\+(\\d+)/int${1}/:s/^[\\+]?(\\d+)/int${1}/:s/int(\\d+)/+00${1}/"
},
{
"tag": "SetupTime", "path": "SetupTime",
"tag": "SetupTime", "path": "*cgreq.SetupTime",
"type": "*variable", "mandatory": true,
"value": "~*req.Event-Timestamp"
},
{
"tag": "SetupTime", "path": "SetupTime",
"tag": "SetupTime", "path": "*cgreq.SetupTime",
"type": "*variable", "mandatory": true,
"filters": ["*exists:~*req.Service-Information.IMS-Information.Time-Stamps.SIP-Request-Timestamp:"],
"value": "~*req.Service-Information.IMS-Information.Time-Stamps.SIP-Request-Timestamp"
},
{
"tag": "Usage", "path": "Usage",
"tag": "Usage", "path": "*cgreq.Usage",
"type": "*constant", "mandatory": true,
"value": "10s"
},
{
"tag": "IMSI", "path": "IMSI",
"tag": "IMSI", "path": "*cgreq.IMSI",
"type": "*variable", "value": "~*req.User-Name"
}
],
@@ -80,18 +80,18 @@
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{
"tag": "GrantedUnitsError",
"path": "Granted-Service-Unit.CC-Time",
"path": "*rep.Granted-Service-Unit.CC-Time",
"filters": ["*notempty:~*cgrep.Error:"],
"type": "*constant", "blocker": true,
"value": "0"
},
{
"tag": "GrantedUnitsUnlimited",
"path": "Granted-Service-Unit.CC-Time",
"path": "*rep.Granted-Service-Unit.CC-Time",
"filters": ["*eq:~*cgrep.MaxUsage:-1"],
"blocker": true,
"type": "*constant", "value": "10"},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time",
{"tag": "GrantedUnits", "path": "*rep.Granted-Service-Unit.CC-Time",
"type": "*variable", "mandatory": true,
"value": "~*cgrep.MaxUsage{*duration_seconds}"}
]
@@ -107,39 +107,39 @@
"flags": ["*initiate", "*accounts"],
"request_fields":[
{
"tag": "OriginID", "path": "OriginID",
"tag": "OriginID", "path": "*cgreq.OriginID",
"type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.IMS-Information.User-Session-Id"},
{
"tag": "OriginHost", "path": "OriginHost",
"tag": "OriginHost", "path": "*cgreq.OriginHost",
"type": "*variable", "value": "~*vars.OriginHost"
},
{
"tag": "Source", "path": "Source",
"tag": "Source", "path": "*cgreq.Source",
"type": "*constant","value": "DiameterAgent"
},
{
"tag": "RequestType", "path": "RequestType",
"tag": "RequestType", "path": "*cgreq.RequestType",
"type": "*constant", "value": "*prepaid"
},
{
"tag": "Account", "path": "Account",
"tag": "Account", "path": "*cgreq.Account",
"type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.IMS-Information.Calling-Party-Address[0]:s/tel:\\+(\\d+)/${1}/"
},
{
"tag": "Account", "path": "Account",
"tag": "Account", "path": "*cgreq.Account",
"filters":["*string:~*req.Service-Information.IMS-Information.Role-Of-Node:2"],
"type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.IMS-Information.Requested-Party-Address:s/tel:(\\+?\\d+)/${1}/:s/sip:(\\+?\\d+)/${1}/:s/^\\+49(\\d+)/int${1}/:s/^0049(\\d+)/int${1}/:s/^49(\\d+)/int${1}/:s/^00(\\d+)/+${1}/:s/^[\\+]?(\\d+)/int${1}/:s/int(\\d+)/49${1}/"
},
{
"tag": "Destination", "path": "Destination",
"tag": "Destination", "path": "*cgreq.Destination",
"type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.IMS-Information.Called-Party-Address:s/tel:(\\+?\\d+)/${1}/:s/^\\+49(\\d+)/int${1}/:s/^0049(\\d+)/int${1}/:s/^49(\\d+)/int${1}/:s/^00(\\d+)/+${1}/:s/^[\\+]?(\\d+)/int${1}/:s/int(\\d+)/+49${1}/"
},
{
"tag": "Destination", "path": "Destination",
"tag": "Destination", "path": "*cgreq.Destination",
"filters": [
"*prefix:~*req.Service-Information.IMS-Information.Called-Party-Address:tel:+",
"*notprefix:~*req.Service-Information.IMS-Information.Called-Party-Address:tel:+49"
@@ -148,22 +148,22 @@
"value": "~*req.Service-Information.IMS-Information.Called-Party-Address:s/tel:(\\+?\\d+)/${1}/:s/^\\+(\\d+)/int${1}/:s/^[\\+]?(\\d+)/int${1}/:s/int(\\d+)/+00${1}/"
},
{
"tag": "SetupTime", "path": "SetupTime",
"tag": "SetupTime", "path": "*cgreq.SetupTime",
"filters": ["*exists:~*req.Service-Information.IMS-Information.Time-Stamps.SIP-Request-Timestamp:"],
"type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.IMS-Information.Time-Stamps.SIP-Request-Timestamp"
},
{
"tag": "AnswerTime", "path": "AnswerTime",
"tag": "AnswerTime", "path": "*cgreq.AnswerTime",
"type": "*variable", "mandatory": true,
"value": "~*req.Event-Timestamp"
},
{
"tag": "Usage", "path": "Usage",
"tag": "Usage", "path": "*cgreq.Usage",
"type": "*constant", "value": "10s"
},
{
"tag": "IMSI", "path": "IMSI",
"tag": "IMSI", "path": "*cgreq.IMSI",
"type": "*variable", "mandatory": true,
"value": "~*req.User-Name"
}
@@ -173,17 +173,17 @@
{
"tag": "GrantedUnitsError",
"filters": ["*notempty:~*cgrep.Error:"],
"path": "Granted-Service-Unit.CC-Time", "blocker": true,
"path": "*rep.Granted-Service-Unit.CC-Time", "blocker": true,
"type": "*constant", "value": "0"
},
{
"tag": "GrantedUnitsUnlimited",
"filters": ["*eq:~*cgrep.MaxUsage:-1"],
"path": "Granted-Service-Unit.CC-Time", "blocker": true,
"path": "*rep.Granted-Service-Unit.CC-Time", "blocker": true,
"type": "*constant", "value": "10"
},
{
"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time",
"tag": "GrantedUnits", "path": "*rep.Granted-Service-Unit.CC-Time",
"type": "*variable", "mandatory": true,
"value": "~*cgrep.MaxUsage{*duration_seconds}"
}
@@ -200,16 +200,16 @@
"flags": ["*update", "*accounts"],
"request_fields":[
{
"tag": "OriginID", "path": "OriginID",
"tag": "OriginID", "path": "*cgreq.OriginID",
"type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.IMS-Information.User-Session-Id"
},
{
"tag": "OriginHost", "path": "OriginHost",
"tag": "OriginHost", "path": "*cgreq.OriginHost",
"type": "*variable", "value": "~*vars.OriginHost"
},
{
"tag": "Usage", "path": "Usage",
"tag": "Usage", "path": "*cgreq.Usage",
"type": "*constant", "value": "10s"
},
],
@@ -218,17 +218,17 @@
{
"tag": "GrantedUnitsOnError",
"filters": ["*notempty:~*cgrep.Error:"],
"path": "Granted-Service-Unit.CC-Time", "blocker": true,
"path": "*rep.Granted-Service-Unit.CC-Time", "blocker": true,
"type": "*constant", "value": "0"
},
{
"tag": "GrantedUnitsUnlimited",
"filters": ["*eq:~*cgrep.MaxUsage:-1"],
"path": "Granted-Service-Unit.CC-Time", "blocker": true,
"path": "*rep.Granted-Service-Unit.CC-Time", "blocker": true,
"type": "*constant", "value": "10"
},
{
"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time",
"tag": "GrantedUnits", "path": "*rep.Granted-Service-Unit.CC-Time",
"type": "*variable", "mandatory": true,
"value": "~*cgrep.MaxUsage{*duration_seconds}"
}
@@ -244,21 +244,21 @@
"flags": ["*terminate", "*accounts", "*cdrs"],
"request_fields":[
{
"tag": "OriginID", "path": "OriginID",
"tag": "OriginID", "path": "*cgreq.OriginID",
"type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.IMS-Information.User-Session-Id"
},
{
"tag": "OriginHost", "path": "OriginHost",
"tag": "OriginHost", "path": "*cgreq.OriginHost",
"type": "*variable", "value": "~*vars.OriginHost"
},
{
"tag": "Usage", "path": "Usage",
"tag": "Usage", "path": "*cgreq.Usage",
"filters": ["*exists:~*req.Service-Information.IMS-Information.Time-Stamps.SIP-Response-Timestamp:"],
"type": "*usage_difference", "mandatory": true,
"value": "~*req.Event-Timestamp;~*req.Service-Information.IMS-Information.Time-Stamps.SIP-Response-Timestamp"},
{
"tag": "Usage", "path": "Usage",
"tag": "Usage", "path": "*cgreq.Usage",
"filters": ["*notexists:~*req.Service-Information.IMS-Information.Time-Stamps.SIP-Response-Timestamp:"],
"type": "*constant", "value": "0s"
},
@@ -266,9 +266,9 @@
"reply_fields":[
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*notempty:~*cgrep.Error:"],
"path": "Result-Code", "blocker": true,
"path": "*rep.Result-Code", "blocker": true,
"type": "*constant", "value": "5030"},
{"tag": "ResultCode", "path": "Result-Code",
{"tag": "ResultCode", "path": "*rep.Result-Code",
"type": "*constant", "value": "2001"}
]
},

View File

@@ -9,113 +9,366 @@
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:1", "*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*initiate", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(1)]", "mandatory": true},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*data"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "Category",
"path": "Category",
"type": "*constant",
"value": "generic"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(1)]",
"mandatory": true
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*constant",
"value": "data"
},
{
"tag": "SetupTime",
"path": "*cgreq.SetupTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*constant",
"value": "2048"
},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{
"tag": "CCATemplate",
"type": "*template",
"value": "*cca"
},
{
"tag": "ResultCode",
"filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
],
},
{
"id": "data_update_grp1",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:2",
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group:1", "*prefix:~*req.Service-Context-Id:gprs"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:2",
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group:1",
"*prefix:~*req.Service-Context-Id:gprs"
],
"flags": ["*update", "*accounts","*continue"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "InitialOriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed", "value": "_grp1"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*contant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(1)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(1)]"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*data"
},
{
"tag": "InitialOriginID",
"path": "*cgreq.InitialOriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*composed",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*composed",
"value": "_grp1"
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*contant",
"value": "generic"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*constant",
"value": "data"
},
{
"tag": "SetupTime",
"path": "*cgreq.SetupTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*constant",
"value": "2048"
},
{
"tag": "LastUsed",
"path": "*cgreq.LastUsed",
"type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(1)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(1)]"
},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{
"tag": "CCATemplate",
"type": "*template",
"value": "*cca"
},
{
"tag": "ResultCode",
"filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
],
},
{
"id": "data_update_grp2",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:2",
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group[1]:2", "*prefix:~*req.Service-Context-Id:gprs"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:2",
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group[1]:2",
"*prefix:~*req.Service-Context-Id:gprs"
],
"flags": ["*update", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "InitialOriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*constant", "value": "_grp2"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(2)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(2)]"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*data"
},
{
"tag": "InitialOriginID",
"path": "*cgreq.InitialOriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginID",
"path": "OriginID",
"type": "*composed",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*constant",
"value": "_grp2"
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*constant",
"value": "generic"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*variable",
"mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*constant",
"value": "data"
},
{
"tag": "SetupTime",
"path": "*cgreq.SetupTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*constant",
"value": "2048"
},
{
"tag": "LastUsed",
"path": "*cgreq.LastUsed",
"type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(2)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(2)]"
},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{
"tag": "CCATemplate",
"type": "*template",
"value": "*cca"
},
{
"tag": "ResultCode",
"filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
],
},
{
"id": "data_terminate",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:3",
"*prefix:~*req.Service-Context-Id:gprs"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:3",
"*prefix:~*req.Service-Context-Id:gprs"
],
"flags": ["*terminate", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginIDPrefix", "path": "OriginIDPrefix", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "LastUsed", "path": "LastUsed", "type": "*handler", "handler_id": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets;~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*data"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginIDPrefix",
"path": "*cgreq.OriginIDPrefix",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*constant",
"value": "generic"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*variable",
"mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*constant",
"value": "data"
},
{
"tag": "SetupTime",
"path": "*cgreq.SetupTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "LastUsed",
"path": "*cgreq.LastUsed",
"type": "*handler",
"handler_id": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets;~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets"
},
],
},
]

View File

@@ -4,35 +4,106 @@
"request_processors": [
{
"id": "dryrun1",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.Service-Context-Id:TestDiamItDryRun"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.Service-Context-Id:TestDiamItDryRun"
],
"flags": ["*dryrun","*continue"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"OptionalField", "type":"*variable",
"value":"~*req.Inexistent", "mandatory":false},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType",
"type": "*constant", "value": "*prepaid"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "UsedUnits1", "path": "UsedUnits1", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"},
{"tag": "UsedUnits2", "path": "UsedUnits2", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*sms"
},
{
"tag": "Val1",
"path": "*cgreq.Val1",
"type": "*constant",
"value": "1"
},
{
"tag": "Val2",
"path": "*cgreq.Val2",
"type": "*constant",
"value": "2"
},
{
"tag": "Val3",
"path": "*cgreq.Val3",
"type": "*constant",
"value": "3"
},
{
"tag": "OptionalField",
"path":"*cgreq.OptionalField",
"type":"*variable",
"value":"~*req.Inexistent",
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "SetupTime",
"path": "*cgreq.SetupTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "UsedUnits1",
"path": "*cgreq.UsedUnits1",
"type": "*variable",
"mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"
},
{
"tag": "UsedUnits2",
"path": "*cgreq.UsedUnits2",
"type": "*variable",
"mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"
},
],
"reply_fields":[
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2002"},
{"tag": "RatingGroup", "path": "Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant", "value": "1"},
{"tag": "CCTotalOctets1", "path": "Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable", "value": "~*cgreq.UsedUnits1"},
{"tag": "GrantedUsage", "path": "Granted-Service-Unit.CC-Time", "type": "*sum",
{
"tag": "CCATemplate",
"type": "*template",
"value": "*cca"
},
{
"tag": "ResultCode",
"path": "*rep.Result-Code",
"type": "*constant",
"value": "2002"
},
{
"tag": "RatingGroup",
"path": "*rep.Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant",
"value": "1"
},
{
"tag": "CCTotalOctets1",
"path": "*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable",
"value": "~*cgreq.UsedUnits1"
},
{
"tag": "GrantedUsage",
"path": "*rep.Granted-Service-Unit.CC-Time",
"type": "*sum",
"value": "~*cgreq.Val1;~*cgreq.Val2;~*cgreq.Val3"},
],
},
@@ -41,29 +112,85 @@
"filters": ["*rsr::~*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[0](!^$)"], // make sure the CC-Total-Octets was populated in the previous processor
"flags": ["*dryrun"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"OptionalField", "type":"*variable",
"value":"~*req.Inexistent", "mandatory":false},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType",
"type": "*constant", "value": "*prepaid"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "UsedUnits1", "path": "UsedUnits1", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"},
{"tag": "UsedUnits2", "path": "UsedUnits2", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*sms"
},
{
"tag": "Val1",
"path": "*cgreq.Val1",
"type": "*constant",
"value": "1"
},
{
"tag": "Val2",
"path": "*cgreq.Val2",
"type": "*constant",
"value": "2"
},
{
"tag": "Val3",
"path": "*cgreq.Val3",
"type": "*constant",
"value": "3"
},
{
"tag": "OptionalField",
"path":"*cgreq.OptionalField",
"type":"*variable",
"value":"~*req.Inexistent"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "SetupTime",
"path": "*cgreq.SetupTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "UsedUnits1",
"path": "*cgreq.UsedUnits1",
"type": "*variable",
"mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"
},
{
"tag": "UsedUnits2",
"path": "*cgreq.UsedUnits2",
"type": "*variable",
"mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"
},
],
"reply_fields":[
{"tag": "RatingGroup", "path": "Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant", "value": "2","new_branch": true},
{"tag": "CCTotalOctets2", "path": "Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable", "value": "~*cgreq.UsedUnits2"},
{
"tag": "RatingGroup",
"path": "*rep.Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant",
"value": "2",
"new_branch": true
},
{
"tag": "CCTotalOctets2",
"path": "*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable",
"value": "~*cgreq.UsedUnits2"
},
],
},

View File

@@ -5,29 +5,83 @@
{
"id": "message",
"filters": ["*string:~*vars.*cmd:CCR", "*prefix:~*req.Service-Context-Id:message",
"*string:~*req.CC-Request-Type:4"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*prefix:~*req.Service-Context-Id:message",
"*string:~*req.CC-Request-Type:4"
],
"flags": ["*message", "*accounts", "*cdrs","*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "sms"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.SMS-Information.Recipient-Address.Address-Data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time", "mandatory": true},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*sms"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*constant",
"value": "sms"
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*variable",
"mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*variable",
"mandatory": true,
"value": "~*req.Service-Information.SMS-Information.Recipient-Address.Address-Data"
},
{
"tag": "SetupTime",
"path": "*cgreq.SetupTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time",
"mandatory": true
},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{
"tag": "ResultCode",
"filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
],
},

View File

@@ -5,21 +5,59 @@
"request_processors": [
{
"id": "simpa_event",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:4",
"*prefix:~*req.Service-Context-Id:simpa"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:4",
"*prefix:~*req.Service-Context-Id:simpa"
],
"flags": ["*message", "*accounts", "*log"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*generic"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*value_exponent", "mandatory": true,
"value": "~*req.Requested-Service-Unit.CC-Money.Unit-Value.Value-Digits;~*req.Requested-Service-Unit.CC-Money.Unit-Value.Exponent"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*generic"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*constant",
"value": "generic"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*variable",
"mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*value_exponent",
"mandatory": true,
"value": "~*req.Requested-Service-Unit.CC-Money.Unit-Value.Value-Digits;~*req.Requested-Service-Unit.CC-Money.Unit-Value.Exponent"
},
],
},
],

View File

@@ -5,39 +5,109 @@
"request_processors": [
{
"id": "TestSessionDisconnect",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:1",
"*prefix:~*req.Service-Context-Id:testSessionDisconnect"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:1",
"*prefix:~*req.Service-Context-Id:testSessionDisconnect"
],
"flags": ["*initiate", "*accounts","*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*variable",
"value": "~*req.Origin-Host", "mandatory": true},
{"tag": "RequestType", "path": "RequestType",
"type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category",
"type": "*constant", "value": "call"},
{"tag": "Account", "path": "Account", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
{"tag": "Subject", "path": "Subject", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Calling-Party-Address", "mandatory": true},
{"tag": "Destination", "path": "Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "DebitInterval", "path": "CGRDebitInterval",
"type": "*constant", "value": "1s"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*voice"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginHost",
"path": "*cgreq.OriginHost",
"type": "*variable",
"value": "~*req.Origin-Host",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*constant",
"value": "call"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data",
"mandatory": true
},
{
"tag": "Subject",
"path": "*cgreq.Subject",
"type": "*variable",
"value": "~*req.Service-Information.IN-Information.Calling-Party-Address",
"mandatory": true
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/",
"mandatory": true
},
{
"tag": "DebitInterval",
"path": "*cgreq.CGRDebitInterval",
"type": "*constant",
"value": "1s"
},
],
"reply_fields":[
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*notempty:~*cgrep.Error:"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time",
{
"tag": "CCATemplate",
"type": "*template",
"value": "*cca"
},
{
"tag": "ResultCode",
"filters": ["*notempty:~*cgrep.Error:"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
{
"tag": "GrantedUnits",
"path": "*rep.Granted-Service-Unit.CC-Time",
"filters": ["*gte:~*cgrep.MaxUsage:0s"],
"type": "*variable", "value": "~*cgrep.MaxUsage{*duration_seconds&*round:0}", "mandatory": true},
"type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds&*round:0}",
"mandatory": true
},
],
},
],

View File

@@ -5,96 +5,299 @@
"request_processors": [
{
"id": "VoiceInit",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:1",
"*prefix:~*req.Service-Context-Id:voice"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:1",
"*prefix:~*req.Service-Context-Id:voice"
],
"flags": ["*initiate", "*accounts", "*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*voice"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginHost",
"path": "*cgreq.OriginHost",
"type": "*remote_host",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*attributes"
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*constant",
"value": "call"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*constant",
"value": "*attributes"
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/",
"mandatory": true
},
{
"tag": "SubscriberID",
"path": "*cgreq.SubscriberId",
"type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data",
"mandatory": true
},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time", "type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
{
"tag": "ResultCode",
"filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
{
"tag": "ResultCode",
"path": "*rep.Result-Code",
"type": "*constant",
"value": "2001"
},
{
"tag": "GrantedUnits",
"path": "*rep.Granted-Service-Unit.CC-Time",
"type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}",
"mandatory": true
},
],
},
{
"id": "VoiceUpdate",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:2",
"*prefix:~*req.Service-Context-Id:voice"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:2",
"*prefix:~*req.Service-Context-Id:voice"
],
"flags": ["*update", "*accounts", "*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "LastUsed", "path": "LastUsed", "type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*voice"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginHost",
"path": "*cgreq.OriginHost",
"type": "*remote_host",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*attributes"
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*constant",
"value": "call"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*constant",
"value": "*attributes"
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/",
"mandatory": true
},
{
"tag": "LastUsed",
"path": "*cgreq.LastUsed",
"type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/",
"mandatory": true
},
{
"tag": "SubscriberID",
"path": "*cgreq.SubscriberId",
"type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data",
"mandatory": true
},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time", "type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
{
"tag": "ResultCode",
"filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
{
"tag": "ResultCode",
"path": "*rep.Result-Code",
"type": "*constant",
"value": "2001"
},
{
"tag": "GrantedUnits",
"path": "*rep.Granted-Service-Unit.CC-Time",
"type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}",
"mandatory": true
},
],
},
{
"id": "VoiceTerminate",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:3",
"*prefix:~*req.Service-Context-Id:voice"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:3",
"*prefix:~*req.Service-Context-Id:voice"
],
"flags": ["*terminate", "*accounts", "*attributes", "*cdrs"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*cc_usage", "mandatory": true,
"value": "~*req.CC-Request-Number;~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/;5m"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*voice"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginHost",
"path": "*cgreq.OriginHost",
"type": "*remote_host",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*attributes"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*constant",
"value": "*attributes"
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*cc_usage",
"mandatory": true,
"value": "~*req.CC-Request-Number;~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/;5m"
},
{
"tag": "LastUsed",
"path": "*cgreq.LastUsed",
"type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/",
"mandatory": true
},
{
"tag": "SubscriberID",
"path": "*cgreq.SubscriberId",
"type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data",
"mandatory": true
},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
{
"tag": "ResultCode",
"filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
{
"tag": "ResultCode",
"path": "*rep.Result-Code",
"type": "*constant",
"value": "2001"
},
],
},
],

View File

@@ -9,113 +9,366 @@
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:1", "*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*initiate", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(1)]", "mandatory": true},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*data"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "Category",
"path": "Category",
"type": "*constant",
"value": "generic"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(1)]",
"mandatory": true
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*constant",
"value": "data"
},
{
"tag": "SetupTime",
"path": "*cgreq.SetupTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*constant",
"value": "2048"
},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{
"tag": "CCATemplate",
"type": "*template",
"value": "*cca"
},
{
"tag": "ResultCode",
"filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
],
},
{
"id": "data_update_grp1",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:2",
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group:1", "*prefix:~*req.Service-Context-Id:gprs"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:2",
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group:1",
"*prefix:~*req.Service-Context-Id:gprs"
],
"flags": ["*update", "*accounts","*continue"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "InitialOriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed", "value": "_grp1"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*contant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(1)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(1)]"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*data"
},
{
"tag": "InitialOriginID",
"path": "*cgreq.InitialOriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*composed",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*composed",
"value": "_grp1"
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*contant",
"value": "generic"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*constant",
"value": "data"
},
{
"tag": "SetupTime",
"path": "*cgreq.SetupTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*constant",
"value": "2048"
},
{
"tag": "LastUsed",
"path": "*cgreq.LastUsed",
"type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(1)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(1)]"
},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{
"tag": "CCATemplate",
"type": "*template",
"value": "*cca"
},
{
"tag": "ResultCode",
"filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
],
},
{
"id": "data_update_grp2",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:2",
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group[1]:2", "*prefix:~*req.Service-Context-Id:gprs"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:2",
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group[1]:2",
"*prefix:~*req.Service-Context-Id:gprs"
],
"flags": ["*update", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "InitialOriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*constant", "value": "_grp2"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(2)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(2)]"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*data"
},
{
"tag": "InitialOriginID",
"path": "*cgreq.InitialOriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginID",
"path": "OriginID",
"type": "*composed",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*constant",
"value": "_grp2"
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*constant",
"value": "generic"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*variable",
"mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*constant",
"value": "data"
},
{
"tag": "SetupTime",
"path": "*cgreq.SetupTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*constant",
"value": "2048"
},
{
"tag": "LastUsed",
"path": "*cgreq.LastUsed",
"type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(2)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(2)]"
},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{
"tag": "CCATemplate",
"type": "*template",
"value": "*cca"
},
{
"tag": "ResultCode",
"filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
],
},
{
"id": "data_terminate",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:3",
"*prefix:~*req.Service-Context-Id:gprs"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:3",
"*prefix:~*req.Service-Context-Id:gprs"
],
"flags": ["*terminate", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginIDPrefix", "path": "OriginIDPrefix", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "LastUsed", "path": "LastUsed", "type": "*handler", "handler_id": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets;~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*data"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginIDPrefix",
"path": "*cgreq.OriginIDPrefix",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*constant",
"value": "generic"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*variable",
"mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*constant",
"value": "data"
},
{
"tag": "SetupTime",
"path": "*cgreq.SetupTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "LastUsed",
"path": "*cgreq.LastUsed",
"type": "*handler",
"handler_id": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets;~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets"
},
],
},
]

View File

@@ -4,35 +4,106 @@
"request_processors": [
{
"id": "dryrun1",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.Service-Context-Id:TestDiamItDryRun"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.Service-Context-Id:TestDiamItDryRun"
],
"flags": ["*dryrun","*continue"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"OptionalField", "type":"*variable",
"value":"~*req.Inexistent", "mandatory":false},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType",
"type": "*constant", "value": "*prepaid"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "UsedUnits1", "path": "UsedUnits1", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"},
{"tag": "UsedUnits2", "path": "UsedUnits2", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*sms"
},
{
"tag": "Val1",
"path": "*cgreq.Val1",
"type": "*constant",
"value": "1"
},
{
"tag": "Val2",
"path": "*cgreq.Val2",
"type": "*constant",
"value": "2"
},
{
"tag": "Val3",
"path": "*cgreq.Val3",
"type": "*constant",
"value": "3"
},
{
"tag": "OptionalField",
"path":"*cgreq.OptionalField",
"type":"*variable",
"value":"~*req.Inexistent",
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "SetupTime",
"path": "*cgreq.SetupTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "UsedUnits1",
"path": "*cgreq.UsedUnits1",
"type": "*variable",
"mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"
},
{
"tag": "UsedUnits2",
"path": "*cgreq.UsedUnits2",
"type": "*variable",
"mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"
},
],
"reply_fields":[
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2002"},
{"tag": "RatingGroup", "path": "Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant", "value": "1"},
{"tag": "CCTotalOctets1", "path": "Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable", "value": "~*cgreq.UsedUnits1"},
{"tag": "GrantedUsage", "path": "Granted-Service-Unit.CC-Time", "type": "*sum",
{
"tag": "CCATemplate",
"type": "*template",
"value": "*cca"
},
{
"tag": "ResultCode",
"path": "*rep.Result-Code",
"type": "*constant",
"value": "2002"
},
{
"tag": "RatingGroup",
"path": "*rep.Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant",
"value": "1"
},
{
"tag": "CCTotalOctets1",
"path": "*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable",
"value": "~*cgreq.UsedUnits1"
},
{
"tag": "GrantedUsage",
"path": "*rep.Granted-Service-Unit.CC-Time",
"type": "*sum",
"value": "~*cgreq.Val1;~*cgreq.Val2;~*cgreq.Val3"},
],
},
@@ -41,29 +112,85 @@
"filters": ["*rsr::~*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[0](!^$)"], // make sure the CC-Total-Octets was populated in the previous processor
"flags": ["*dryrun"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"OptionalField", "type":"*variable",
"value":"~*req.Inexistent", "mandatory":false},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType",
"type": "*constant", "value": "*prepaid"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "UsedUnits1", "path": "UsedUnits1", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"},
{"tag": "UsedUnits2", "path": "UsedUnits2", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*sms"
},
{
"tag": "Val1",
"path": "*cgreq.Val1",
"type": "*constant",
"value": "1"
},
{
"tag": "Val2",
"path": "*cgreq.Val2",
"type": "*constant",
"value": "2"
},
{
"tag": "Val3",
"path": "*cgreq.Val3",
"type": "*constant",
"value": "3"
},
{
"tag": "OptionalField",
"path":"*cgreq.OptionalField",
"type":"*variable",
"value":"~*req.Inexistent"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "SetupTime",
"path": "*cgreq.SetupTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "UsedUnits1",
"path": "*cgreq.UsedUnits1",
"type": "*variable",
"mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"
},
{
"tag": "UsedUnits2",
"path": "*cgreq.UsedUnits2",
"type": "*variable",
"mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"
},
],
"reply_fields":[
{"tag": "RatingGroup", "path": "Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant", "value": "2","new_branch": true},
{"tag": "CCTotalOctets2", "path": "Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable", "value": "~*cgreq.UsedUnits2"},
{
"tag": "RatingGroup",
"path": "*rep.Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant",
"value": "2",
"new_branch": true
},
{
"tag": "CCTotalOctets2",
"path": "*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable",
"value": "~*cgreq.UsedUnits2"
},
],
},

View File

@@ -5,29 +5,83 @@
{
"id": "message",
"filters": ["*string:~*vars.*cmd:CCR", "*prefix:~*req.Service-Context-Id:message",
"*string:~*req.CC-Request-Type:4"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*prefix:~*req.Service-Context-Id:message",
"*string:~*req.CC-Request-Type:4"
],
"flags": ["*message", "*accounts", "*cdrs","*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "sms"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.SMS-Information.Recipient-Address.Address-Data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time", "mandatory": true},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*sms"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*constant",
"value": "sms"
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*variable",
"mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*variable",
"mandatory": true,
"value": "~*req.Service-Information.SMS-Information.Recipient-Address.Address-Data"
},
{
"tag": "SetupTime",
"path": "*cgreq.SetupTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time",
"mandatory": true
},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{
"tag": "ResultCode",
"filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
],
},

View File

@@ -5,21 +5,59 @@
"request_processors": [
{
"id": "simpa_event",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:4",
"*prefix:~*req.Service-Context-Id:simpa"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:4",
"*prefix:~*req.Service-Context-Id:simpa"
],
"flags": ["*message", "*accounts", "*log"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*generic"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*value_exponent", "mandatory": true,
"value": "~*req.Requested-Service-Unit.CC-Money.Unit-Value.Value-Digits;~*req.Requested-Service-Unit.CC-Money.Unit-Value.Exponent"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*generic"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*constant",
"value": "generic"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*variable",
"mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*value_exponent",
"mandatory": true,
"value": "~*req.Requested-Service-Unit.CC-Money.Unit-Value.Value-Digits;~*req.Requested-Service-Unit.CC-Money.Unit-Value.Exponent"
},
],
},
],

View File

@@ -5,39 +5,109 @@
"request_processors": [
{
"id": "TestSessionDisconnect",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:1",
"*prefix:~*req.Service-Context-Id:testSessionDisconnect"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:1",
"*prefix:~*req.Service-Context-Id:testSessionDisconnect"
],
"flags": ["*initiate", "*accounts","*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*variable",
"value": "~*req.Origin-Host", "mandatory": true},
{"tag": "RequestType", "path": "RequestType",
"type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category",
"type": "*constant", "value": "call"},
{"tag": "Account", "path": "Account", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
{"tag": "Subject", "path": "Subject", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Calling-Party-Address", "mandatory": true},
{"tag": "Destination", "path": "Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "DebitInterval", "path": "CGRDebitInterval",
"type": "*constant", "value": "1s"},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*voice"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginHost",
"path": "*cgreq.OriginHost",
"type": "*variable",
"value": "~*req.Origin-Host",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*prepaid"
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*constant",
"value": "call"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data",
"mandatory": true
},
{
"tag": "Subject",
"path": "*cgreq.Subject",
"type": "*variable",
"value": "~*req.Service-Information.IN-Information.Calling-Party-Address",
"mandatory": true
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/",
"mandatory": true
},
{
"tag": "DebitInterval",
"path": "*cgreq.CGRDebitInterval",
"type": "*constant",
"value": "1s"
},
],
"reply_fields":[
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*notempty:~*cgrep.Error:"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time",
{
"tag": "CCATemplate",
"type": "*template",
"value": "*cca"
},
{
"tag": "ResultCode",
"filters": ["*notempty:~*cgrep.Error:"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
{
"tag": "GrantedUnits",
"path": "*rep.Granted-Service-Unit.CC-Time",
"filters": ["*gte:~*cgrep.MaxUsage:0s"],
"type": "*variable", "value": "~*cgrep.MaxUsage{*duration_seconds&*round:0}", "mandatory": true},
"type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds&*round:0}",
"mandatory": true
},
],
},
],

View File

@@ -5,96 +5,299 @@
"request_processors": [
{
"id": "VoiceInit",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:1",
"*prefix:~*req.Service-Context-Id:voice"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:1",
"*prefix:~*req.Service-Context-Id:voice"
],
"flags": ["*initiate", "*accounts", "*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*voice"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginHost",
"path": "*cgreq.OriginHost",
"type": "*remote_host",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*attributes"
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*constant",
"value": "call"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*constant",
"value": "*attributes"
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/",
"mandatory": true
},
{
"tag": "SubscriberID",
"path": "*cgreq.SubscriberId",
"type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data",
"mandatory": true
},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time", "type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
{
"tag": "ResultCode",
"filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
{
"tag": "ResultCode",
"path": "*rep.Result-Code",
"type": "*constant",
"value": "2001"
},
{
"tag": "GrantedUnits",
"path": "*rep.Granted-Service-Unit.CC-Time",
"type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}",
"mandatory": true
},
],
},
{
"id": "VoiceUpdate",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:2",
"*prefix:~*req.Service-Context-Id:voice"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:2",
"*prefix:~*req.Service-Context-Id:voice"
],
"flags": ["*update", "*accounts", "*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "LastUsed", "path": "LastUsed", "type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*voice"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginHost",
"path": "*cgreq.OriginHost",
"type": "*remote_host",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*attributes"
},
{
"tag": "Category",
"path": "*cgreq.Category",
"type": "*constant",
"value": "call"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*constant",
"value": "*attributes"
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/",
"mandatory": true
},
{
"tag": "LastUsed",
"path": "*cgreq.LastUsed",
"type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/",
"mandatory": true
},
{
"tag": "SubscriberID",
"path": "*cgreq.SubscriberId",
"type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data",
"mandatory": true
},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time", "type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
{
"tag": "ResultCode",
"filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
{
"tag": "ResultCode",
"path": "*rep.Result-Code",
"type": "*constant",
"value": "2001"
},
{
"tag": "GrantedUnits",
"path": "*rep.Granted-Service-Unit.CC-Time",
"type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}",
"mandatory": true
},
],
},
{
"id": "VoiceTerminate",
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:3",
"*prefix:~*req.Service-Context-Id:voice"],
"filters": [
"*string:~*vars.*cmd:CCR",
"*string:~*req.CC-Request-Type:3",
"*prefix:~*req.Service-Context-Id:voice"
],
"flags": ["*terminate", "*accounts", "*attributes", "*cdrs"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*cc_usage", "mandatory": true,
"value": "~*req.CC-Request-Number;~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/;5m"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
{
"tag": "ToR",
"path": "*cgreq.ToR",
"type": "*constant",
"value": "*voice"
},
{
"tag": "OriginID",
"path": "*cgreq.OriginID",
"type": "*variable",
"value": "~*req.Session-Id",
"mandatory": true
},
{
"tag": "OriginHost",
"path": "*cgreq.OriginHost",
"type": "*remote_host",
"mandatory": true
},
{
"tag": "RequestType",
"path": "*cgreq.RequestType",
"type": "*constant",
"value": "*attributes"
},
{
"tag": "Account",
"path": "*cgreq.Account",
"type": "*constant",
"value": "*attributes"
},
{
"tag": "Destination",
"path": "*cgreq.Destination",
"type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number",
"mandatory": true
},
{
"tag": "AnswerTime",
"path": "*cgreq.AnswerTime",
"type": "*variable",
"value": "~*req.Event-Timestamp",
"mandatory": true
},
{
"tag": "Usage",
"path": "*cgreq.Usage",
"type": "*cc_usage",
"mandatory": true,
"value": "~*req.CC-Request-Number;~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/;5m"
},
{
"tag": "LastUsed",
"path": "*cgreq.LastUsed",
"type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/",
"mandatory": true
},
{
"tag": "SubscriberID",
"path": "*cgreq.SubscriberId",
"type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data",
"mandatory": true
},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
{
"tag": "ResultCode",
"filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "*rep.Result-Code",
"type": "*constant",
"value": "5030",
"blocker": true
},
{
"tag": "ResultCode",
"path": "*rep.Result-Code",
"type": "*constant",
"value": "2001"
},
],
},
],

View File

@@ -9,24 +9,24 @@
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:1", "*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*initiate", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(1)]", "mandatory": true},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*constant", "value": "2048"},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},
@@ -36,29 +36,29 @@
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group:1", "*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*update", "*accounts","*continue"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "InitialOriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "*cgreq.InitialOriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed", "value": "_grp1"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*contant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed", "value": "_grp1"},
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*contant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*sum",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(1)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(1)]"},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},
@@ -68,29 +68,29 @@
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group[1]:2", "*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*update", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "InitialOriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "*cgreq.InitialOriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*constant", "value": "_grp2"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*constant", "value": "_grp2"},
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*sum",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(2)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(2)]"},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},
@@ -100,21 +100,21 @@
"*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*terminate", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginIDPrefix", "path": "OriginIDPrefix", "type": "*variable",
{"tag": "OriginIDPrefix", "path": "*cgreq.OriginIDPrefix", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "LastUsed", "path": "LastUsed", "type": "*handler", "handler_id": "*sum",
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*handler", "handler_id": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets;~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets"},
],
},

View File

@@ -7,32 +7,32 @@
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.Service-Context-Id:TestDiamItDryRun"],
"flags": ["*dryrun","*continue"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"OptionalField", "type":"*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "*cgreq.Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "*cgreq.Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "*cgreq.Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"*cgreq.OptionalField", "type":"*variable",
"value":"~*req.Inexistent", "mandatory":false},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType",
{"tag": "RequestType", "path": "*cgreq.RequestType",
"type": "*constant", "value": "*prepaid"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "UsedUnits1", "path": "UsedUnits1", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits1", "path": "*cgreq.UsedUnits1", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"},
{"tag": "UsedUnits2", "path": "UsedUnits2", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits2", "path": "*cgreq.UsedUnits2", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"},
],
"reply_fields":[
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2002"},
{"tag": "RatingGroup", "path": "Multiple-Services-Credit-Control.Rating-Group",
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2002"},
{"tag": "RatingGroup", "path": "*rep.Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant", "value": "1"},
{"tag": "CCTotalOctets1", "path": "Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
{"tag": "CCTotalOctets1", "path": "*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable", "value": "~*cgreq.UsedUnits1"},
{"tag": "GrantedUsage", "path": "Granted-Service-Unit.CC-Time", "type": "*sum",
{"tag": "GrantedUsage", "path": "*rep.Granted-Service-Unit.CC-Time", "type": "*sum",
"value": "~*cgreq.Val1;~*cgreq.Val2;~*cgreq.Val3"},
],
},
@@ -41,28 +41,28 @@
"filters": ["*rsr::~*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[0](!^$)"], // make sure the CC-Total-Octets was populated in the previous processor
"flags": ["*dryrun"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"OptionalField", "type":"*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "*cgreq.Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "*cgreq.Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "*cgreq.Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"*cgreq.OptionalField", "type":"*variable",
"value":"~*req.Inexistent", "mandatory":false},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType",
{"tag": "RequestType", "path": "*cgreq.RequestType",
"type": "*constant", "value": "*prepaid"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "UsedUnits1", "path": "UsedUnits1", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits1", "path": "*cgreq.UsedUnits1", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"},
{"tag": "UsedUnits2", "path": "UsedUnits2", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits2", "path": "*cgreq.UsedUnits2", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"},
],
"reply_fields":[
{"tag": "RatingGroup", "path": "Multiple-Services-Credit-Control.Rating-Group",
{"tag": "RatingGroup", "path": "*rep.Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant", "value": "2","new_branch": true},
{"tag": "CCTotalOctets2", "path": "Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
{"tag": "CCTotalOctets2", "path": "*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable", "value": "~*cgreq.UsedUnits2"},
],
},

View File

@@ -9,25 +9,25 @@
"*string:~*req.CC-Request-Type:4"],
"flags": ["*message", "*accounts", "*cdrs","*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*sms"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "sms"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "sms"},
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*variable", "mandatory": true,
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.SMS-Information.Recipient-Address.Address-Data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},

View File

@@ -9,16 +9,16 @@
"*prefix:~*req.Service-Context-Id:simpa"],
"flags": ["*message", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*generic"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*generic"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*value_exponent", "mandatory": true,
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*value_exponent", "mandatory": true,
"value": "~*req.Requested-Service-Unit.CC-Money.Unit-Value.Value-Digits;~*req.Requested-Service-Unit.CC-Money.Unit-Value.Exponent"},
],
},

View File

@@ -9,28 +9,28 @@
"*prefix:~*req.Service-Context-Id:voice"],
"flags": ["*initiate", "*accounts", "*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
{"tag": "SubscriberID", "path": "*cgreq.SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time", "type": "*variable",
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "*rep.Granted-Service-Unit.CC-Time", "type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
],
},
@@ -40,30 +40,30 @@
"*prefix:~*req.Service-Context-Id:voice"],
"flags": ["*update", "*accounts", "*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "LastUsed", "path": "LastUsed", "type": "*variable",
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
{"tag": "SubscriberID", "path": "*cgreq.SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time", "type": "*variable",
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "*rep.Granted-Service-Unit.CC-Time", "type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
],
},
@@ -73,28 +73,28 @@
"*prefix:~*req.Service-Context-Id:voice"],
"flags": ["*terminate", "*accounts", "*attributes", "*cdrs"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*cc_usage", "mandatory": true,
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*cc_usage", "mandatory": true,
"value": "~*req.CC-Request-Number;~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/;5m"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*variable",
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
{"tag": "SubscriberID", "path": "*cgreq.SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2001"},
],
},
],

View File

@@ -9,24 +9,24 @@
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:1", "*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*initiate", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(1)]", "mandatory": true},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*constant", "value": "2048"},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},
@@ -36,29 +36,29 @@
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group:1", "*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*update", "*accounts","*continue"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "InitialOriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "*cgreq.InitialOriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed", "value": "_grp1"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*contant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed", "value": "_grp1"},
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*contant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*sum",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(1)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(1)]"},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},
@@ -68,29 +68,29 @@
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group[1]:2", "*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*update", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "InitialOriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "*cgreq.InitialOriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*constant", "value": "_grp2"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*constant", "value": "_grp2"},
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*sum",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(2)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(2)]"},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},
@@ -100,21 +100,21 @@
"*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*terminate", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginIDPrefix", "path": "OriginIDPrefix", "type": "*variable",
{"tag": "OriginIDPrefix", "path": "*cgreq.OriginIDPrefix", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "LastUsed", "path": "LastUsed", "type": "*handler", "handler_id": "*sum",
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*handler", "handler_id": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets;~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets"},
],
},

View File

@@ -7,32 +7,32 @@
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.Service-Context-Id:TestDiamItDryRun"],
"flags": ["*dryrun","*continue"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"OptionalField", "type":"*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "*cgreq.Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "*cgreq.Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "*cgreq.Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"*cgreq.OptionalField", "type":"*variable",
"value":"~*req.Inexistent", "mandatory":false},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType",
{"tag": "RequestType", "path": "*cgreq.RequestType",
"type": "*constant", "value": "*prepaid"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "UsedUnits1", "path": "UsedUnits1", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits1", "path": "*cgreq.UsedUnits1", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"},
{"tag": "UsedUnits2", "path": "UsedUnits2", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits2", "path": "*cgreq.UsedUnits2", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"},
],
"reply_fields":[
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2002"},
{"tag": "RatingGroup", "path": "Multiple-Services-Credit-Control.Rating-Group",
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2002"},
{"tag": "RatingGroup", "path": "*rep.Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant", "value": "1"},
{"tag": "CCTotalOctets1", "path": "Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
{"tag": "CCTotalOctets1", "path": "*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable", "value": "~*cgreq.UsedUnits1"},
{"tag": "GrantedUsage", "path": "Granted-Service-Unit.CC-Time", "type": "*sum",
{"tag": "GrantedUsage", "path": "*rep.Granted-Service-Unit.CC-Time", "type": "*sum",
"value": "~*cgreq.Val1;~*cgreq.Val2;~*cgreq.Val3"},
],
},
@@ -41,28 +41,28 @@
"filters": ["*rsr::~*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[0](!^$)"], // make sure the CC-Total-Octets was populated in the previous processor
"flags": ["*dryrun"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"OptionalField", "type":"*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "*cgreq.Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "*cgreq.Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "*cgreq.Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"*cgreq.OptionalField", "type":"*variable",
"value":"~*req.Inexistent", "mandatory":false},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType",
{"tag": "RequestType", "path": "*cgreq.RequestType",
"type": "*constant", "value": "*prepaid"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "UsedUnits1", "path": "UsedUnits1", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits1", "path": "*cgreq.UsedUnits1", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"},
{"tag": "UsedUnits2", "path": "UsedUnits2", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits2", "path": "*cgreq.UsedUnits2", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"},
],
"reply_fields":[
{"tag": "RatingGroup", "path": "Multiple-Services-Credit-Control.Rating-Group",
{"tag": "RatingGroup", "path": "*rep.Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant", "value": "2","new_branch": true},
{"tag": "CCTotalOctets2", "path": "Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
{"tag": "CCTotalOctets2", "path": "*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable", "value": "~*cgreq.UsedUnits2"},
],
},

View File

@@ -9,25 +9,25 @@
"*string:~*req.CC-Request-Type:4"],
"flags": ["*message", "*accounts", "*cdrs","*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*sms"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "sms"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "sms"},
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*variable", "mandatory": true,
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.SMS-Information.Recipient-Address.Address-Data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},

View File

@@ -9,16 +9,16 @@
"*prefix:~*req.Service-Context-Id:simpa"],
"flags": ["*message", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*generic"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*generic"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*value_exponent", "mandatory": true,
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*value_exponent", "mandatory": true,
"value": "~*req.Requested-Service-Unit.CC-Money.Unit-Value.Value-Digits;~*req.Requested-Service-Unit.CC-Money.Unit-Value.Exponent"},
],
},

View File

@@ -9,28 +9,28 @@
"*prefix:~*req.Service-Context-Id:voice"],
"flags": ["*initiate", "*accounts", "*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
{"tag": "SubscriberID", "path": "*cgreq.SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time", "type": "*variable",
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "*rep.Granted-Service-Unit.CC-Time", "type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
],
},
@@ -40,30 +40,30 @@
"*prefix:~*req.Service-Context-Id:voice"],
"flags": ["*update", "*accounts", "*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "LastUsed", "path": "LastUsed", "type": "*variable",
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
{"tag": "SubscriberID", "path": "*cgreq.SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time", "type": "*variable",
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "*rep.Granted-Service-Unit.CC-Time", "type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
],
},
@@ -73,28 +73,28 @@
"*prefix:~*req.Service-Context-Id:voice"],
"flags": ["*terminate", "*accounts", "*attributes", "*cdrs"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*cc_usage", "mandatory": true,
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*cc_usage", "mandatory": true,
"value": "~*req.CC-Request-Number;~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/;5m"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*variable",
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
{"tag": "SubscriberID", "path": "*cgreq.SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2001"},
],
},
],

View File

@@ -9,24 +9,24 @@
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:1", "*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*initiate", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(1)]", "mandatory": true},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*constant", "value": "2048"},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},
@@ -36,29 +36,29 @@
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group:1", "*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*update", "*accounts","*continue"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "InitialOriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "*cgreq.InitialOriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed", "value": "_grp1"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*contant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed", "value": "_grp1"},
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*contant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*sum",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(1)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(1)]"},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},
@@ -68,29 +68,29 @@
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group[1]:2", "*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*update", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "InitialOriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "InitialOriginID", "path": "*cgreq.InitialOriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*constant", "value": "_grp2"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*constant", "value": "_grp2"},
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*sum",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(2)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(2)]"},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},
@@ -100,21 +100,21 @@
"*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*terminate", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginIDPrefix", "path": "OriginIDPrefix", "type": "*variable",
{"tag": "OriginIDPrefix", "path": "*cgreq.OriginIDPrefix", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "LastUsed", "path": "LastUsed", "type": "*handler", "handler_id": "*sum",
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*handler", "handler_id": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets;~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets"},
],
},

View File

@@ -7,32 +7,32 @@
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.Service-Context-Id:TestDiamItDryRun"],
"flags": ["*dryrun","*continue"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"OptionalField", "type":"*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "*cgreq.Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "*cgreq.Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "*cgreq.Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"*cgreq.OptionalField", "type":"*variable",
"value":"~*req.Inexistent", "mandatory":false},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType",
{"tag": "RequestType", "path": "*cgreq.RequestType",
"type": "*constant", "value": "*prepaid"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "UsedUnits1", "path": "UsedUnits1", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits1", "path": "*cgreq.UsedUnits1", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"},
{"tag": "UsedUnits2", "path": "UsedUnits2", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits2", "path": "*cgreq.UsedUnits2", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"},
],
"reply_fields":[
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2002"},
{"tag": "RatingGroup", "path": "Multiple-Services-Credit-Control.Rating-Group",
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2002"},
{"tag": "RatingGroup", "path": "*rep.Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant", "value": "1"},
{"tag": "CCTotalOctets1", "path": "Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
{"tag": "CCTotalOctets1", "path": "*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable", "value": "~*cgreq.UsedUnits1"},
{"tag": "GrantedUsage", "path": "Granted-Service-Unit.CC-Time", "type": "*sum",
{"tag": "GrantedUsage", "path": "*rep.Granted-Service-Unit.CC-Time", "type": "*sum",
"value": "~*cgreq.Val1;~*cgreq.Val2;~*cgreq.Val3"},
],
},
@@ -41,28 +41,28 @@
"filters": ["*rsr::~*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[0](!^$)"], // make sure the CC-Total-Octets was populated in the previous processor
"flags": ["*dryrun"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"OptionalField", "type":"*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*sms"},
{"tag": "Val1", "path": "*cgreq.Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "*cgreq.Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "*cgreq.Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"*cgreq.OptionalField", "type":"*variable",
"value":"~*req.Inexistent", "mandatory":false},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType",
{"tag": "RequestType", "path": "*cgreq.RequestType",
"type": "*constant", "value": "*prepaid"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "UsedUnits1", "path": "UsedUnits1", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits1", "path": "*cgreq.UsedUnits1", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"},
{"tag": "UsedUnits2", "path": "UsedUnits2", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits2", "path": "*cgreq.UsedUnits2", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"},
],
"reply_fields":[
{"tag": "RatingGroup", "path": "Multiple-Services-Credit-Control.Rating-Group",
{"tag": "RatingGroup", "path": "*rep.Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant", "value": "2","new_branch": true},
{"tag": "CCTotalOctets2", "path": "Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
{"tag": "CCTotalOctets2", "path": "*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable", "value": "~*cgreq.UsedUnits2"},
],
},

View File

@@ -9,25 +9,25 @@
"*string:~*req.CC-Request-Type:4"],
"flags": ["*message", "*accounts", "*cdrs","*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*sms"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "sms"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "sms"},
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*variable", "mandatory": true,
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.SMS-Information.Recipient-Address.Address-Data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},

View File

@@ -9,16 +9,16 @@
"*prefix:~*req.Service-Context-Id:simpa"],
"flags": ["*message", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*generic"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*generic"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*value_exponent", "mandatory": true,
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*value_exponent", "mandatory": true,
"value": "~*req.Requested-Service-Unit.CC-Money.Unit-Value.Value-Digits;~*req.Requested-Service-Unit.CC-Money.Unit-Value.Exponent"},
],
},

View File

@@ -9,28 +9,28 @@
"*prefix:~*req.Service-Context-Id:voice"],
"flags": ["*initiate", "*accounts", "*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
{"tag": "SubscriberID", "path": "*cgreq.SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time", "type": "*variable",
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "*rep.Granted-Service-Unit.CC-Time", "type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
],
},
@@ -40,30 +40,30 @@
"*prefix:~*req.Service-Context-Id:voice"],
"flags": ["*update", "*accounts", "*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "LastUsed", "path": "LastUsed", "type": "*variable",
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
{"tag": "SubscriberID", "path": "*cgreq.SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time", "type": "*variable",
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "*rep.Granted-Service-Unit.CC-Time", "type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
],
},
@@ -73,28 +73,28 @@
"*prefix:~*req.Service-Context-Id:voice"],
"flags": ["*terminate", "*accounts", "*attributes", "*cdrs"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*cc_usage", "mandatory": true,
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*cc_usage", "mandatory": true,
"value": "~*req.CC-Request-Number;~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/;5m"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*variable",
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
{"tag": "SubscriberID", "path": "*cgreq.SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2001"},
],
},
],

View File

@@ -9,25 +9,25 @@
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.CC-Request-Type:1", "*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*initiate", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "*api_key", "path": "*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "*api_key", "path": "*cgreq.*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(1)]", "mandatory": true},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*constant", "value": "2048"},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},
@@ -37,30 +37,30 @@
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group:1", "*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*update", "*accounts","*continue"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "*api_key", "path": "*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "InitialOriginID", "path": "InitialOriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "*api_key", "path": "*cgreq.*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "InitialOriginID", "path": "*cgreq.InitialOriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed", "value": "_grp1"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*contant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed", "value": "_grp1"},
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*contant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*sum",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(1)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(1)]"},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},
@@ -70,30 +70,30 @@
"*string:~*req.Multiple-Services-Credit-Control.Rating-Group[1]:2", "*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*update", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "*api_key", "path": "*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "InitialOriginID", "path": "InitialOriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "*api_key", "path": "*cgreq.*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "InitialOriginID", "path": "*cgreq.InitialOriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*composed",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*composed",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*constant", "value": "_grp2"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*constant", "value": "_grp2"},
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*sum",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*constant", "value": "2048"},
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~Rating-Group(2)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets[~Rating-Group(2)]"},
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},
@@ -103,22 +103,22 @@
"*prefix:~*req.Service-Context-Id:gprs"],
"flags": ["*terminate", "*accounts"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*data"},
{"tag": "*api_key", "path": "*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*data"},
{"tag": "*api_key", "path": "*cgreq.*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginIDPrefix", "path": "OriginIDPrefix", "type": "*variable",
{"tag": "OriginIDPrefix", "path": "*cgreq.OriginIDPrefix", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*constant", "value": "data"},
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "LastUsed", "path": "LastUsed", "type": "*handler", "handler_id": "*sum",
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*handler", "handler_id": "*sum",
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets;~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Output-Octets"},
],
},

View File

@@ -7,33 +7,33 @@
"filters": ["*string:~*vars.*cmd:CCR", "*string:~*req.Service-Context-Id:TestDiamItDryRun"],
"flags": ["*dryrun","*continue"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "*api_key", "path": "*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "Val1", "path": "Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"OptionalField", "type":"*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*sms"},
{"tag": "*api_key", "path": "*cgreq.*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "Val1", "path": "*cgreq.Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "*cgreq.Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "*cgreq.Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"*cgreq.OptionalField", "type":"*variable",
"value":"~*req.Inexistent", "mandatory":false},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType",
{"tag": "RequestType", "path": "*cgreq.RequestType",
"type": "*constant", "value": "*prepaid"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "UsedUnits1", "path": "UsedUnits1", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits1", "path": "*cgreq.UsedUnits1", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"},
{"tag": "UsedUnits2", "path": "UsedUnits2", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits2", "path": "*cgreq.UsedUnits2", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"},
],
"reply_fields":[
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2002"},
{"tag": "RatingGroup", "path": "Multiple-Services-Credit-Control.Rating-Group",
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2002"},
{"tag": "RatingGroup", "path": "*rep.Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant", "value": "1"},
{"tag": "CCTotalOctets1", "path": "Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
{"tag": "CCTotalOctets1", "path": "*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable", "value": "~*cgreq.UsedUnits1"},
{"tag": "GrantedUsage", "path": "Granted-Service-Unit.CC-Time", "type": "*sum",
{"tag": "GrantedUsage", "path": "*rep.Granted-Service-Unit.CC-Time", "type": "*sum",
"value": "~*cgreq.Val1;~*cgreq.Val2;~*cgreq.Val3"},
],
},
@@ -42,29 +42,29 @@
"filters": ["*rsr::~*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[0](!^$)"], // make sure the CC-Total-Octets was populated in the previous processor
"flags": ["*dryrun"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "*api_key", "path": "*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "Val1", "path": "Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"OptionalField", "type":"*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*sms"},
{"tag": "*api_key", "path": "*cgreq.*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "Val1", "path": "*cgreq.Val1", "type": "*constant", "value": "1"},
{"tag": "Val2", "path": "*cgreq.Val2", "type": "*constant", "value": "2"},
{"tag": "Val3", "path": "*cgreq.Val3", "type": "*constant", "value": "3"},
{"tag": "OptionalField", "path":"*cgreq.OptionalField", "type":"*variable",
"value":"~*req.Inexistent", "mandatory":false},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType",
{"tag": "RequestType", "path": "*cgreq.RequestType",
"type": "*constant", "value": "*prepaid"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "UsedUnits1", "path": "UsedUnits1", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits1", "path": "*cgreq.UsedUnits1", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(1)]"},
{"tag": "UsedUnits2", "path": "UsedUnits2", "type": "*variable", "mandatory": true,
{"tag": "UsedUnits2", "path": "*cgreq.UsedUnits2", "type": "*variable", "mandatory": true,
"value": "~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets[~Rating-Group(2)]"},
],
"reply_fields":[
{"tag": "RatingGroup", "path": "Multiple-Services-Credit-Control.Rating-Group",
{"tag": "RatingGroup", "path": "*rep.Multiple-Services-Credit-Control.Rating-Group",
"type": "*constant", "value": "2","new_branch": true},
{"tag": "CCTotalOctets2", "path": "Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
{"tag": "CCTotalOctets2", "path": "*rep.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Total-Octets",
"type": "*variable", "value": "~*cgreq.UsedUnits2"},
],
},

View File

@@ -9,26 +9,26 @@
"*string:~*req.CC-Request-Type:4"],
"flags": ["*message", "*accounts", "*cdrs","*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*sms"},
{"tag": "*api_key", "path": "*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*sms"},
{"tag": "*api_key", "path": "*cgreq.*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "sms"},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "sms"},
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "Destination", "path": "Destination", "type": "*variable", "mandatory": true,
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "mandatory": true,
"value": "~*req.Service-Information.SMS-Information.Recipient-Address.Address-Data"},
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
],
},

View File

@@ -9,17 +9,17 @@
"*prefix:~*req.Service-Context-Id:simpa"],
"flags": ["*message", "*accounts", "*log"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*generic"},
{"tag": "*api_key", "path": "*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*generic"},
{"tag": "*api_key", "path": "*cgreq.*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "Account", "type": "*variable", "mandatory": true,
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "generic"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "mandatory": true,
"value": "~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]"},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*value_exponent", "mandatory": true,
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*value_exponent", "mandatory": true,
"value": "~*req.Requested-Service-Unit.CC-Money.Unit-Value.Value-Digits;~*req.Requested-Service-Unit.CC-Money.Unit-Value.Exponent"},
],
},

View File

@@ -9,34 +9,34 @@
"*prefix:~*req.Service-Context-Id:testSessionDisconnect"],
"flags": ["*initiate", "*accounts","*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "*api_key", "path": "*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice"},
{"tag": "*api_key", "path": "*cgreq.*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*variable",
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*variable",
"value": "~*req.Origin-Host", "mandatory": true},
{"tag": "RequestType", "path": "RequestType",
{"tag": "RequestType", "path": "*cgreq.RequestType",
"type": "*constant", "value": "*prepaid"},
{"tag": "Category", "path": "Category",
{"tag": "Category", "path": "*cgreq.Category",
"type": "*constant", "value": "call"},
{"tag": "Account", "path": "Account", "type": "*variable",
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
{"tag": "Subject", "path": "Subject", "type": "*variable",
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Calling-Party-Address", "mandatory": true},
{"tag": "Destination", "path": "Destination", "type": "*variable",
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "DebitInterval", "path": "CGRDebitInterval",
{"tag": "DebitInterval", "path": "*cgreq.CGRDebitInterval",
"type": "*constant", "value": "1s"},
],
"reply_fields":[
{"tag": "CCATemplate", "type": "*template", "value": "*cca"},
{"tag": "ResultCode", "filters": ["*notempty:~*cgrep.Error:"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time",
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "GrantedUnits", "path": "*rep.Granted-Service-Unit.CC-Time",
"filters": ["*gte:~*cgrep.MaxUsage:0s"],
"type": "*variable", "value": "~*cgrep.MaxUsage{*duration_seconds&*round:0}", "mandatory": true},
],

View File

@@ -9,29 +9,29 @@
"*prefix:~*req.Service-Context-Id:voice"],
"flags": ["*initiate", "*accounts", "*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "*api_key", "path": "*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice"},
{"tag": "*api_key", "path": "*cgreq.*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
{"tag": "SubscriberID", "path": "*cgreq.SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time", "type": "*variable",
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "*rep.Granted-Service-Unit.CC-Time", "type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
],
},
@@ -41,31 +41,31 @@
"*prefix:~*req.Service-Context-Id:voice"],
"flags": ["*update", "*accounts", "*attributes"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "*api_key", "path": "*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice"},
{"tag": "*api_key", "path": "*cgreq.*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*variable",
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
"value": "~*req.Requested-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "LastUsed", "path": "LastUsed", "type": "*variable",
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
{"tag": "SubscriberID", "path": "*cgreq.SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "Granted-Service-Unit.CC-Time", "type": "*variable",
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2001"},
{"tag": "GrantedUnits", "path": "*rep.Granted-Service-Unit.CC-Time", "type": "*variable",
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
],
},
@@ -75,29 +75,29 @@
"*prefix:~*req.Service-Context-Id:voice"],
"flags": ["*terminate", "*accounts", "*attributes", "*cdrs"],
"request_fields":[
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice"},
{"tag": "*api_key", "path": "*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice"},
{"tag": "*api_key", "path": "*cgreq.*api_key", "type": "*constant", "value": "ses12345"},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
"mandatory": true},
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Account", "path": "Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "Destination", "type": "*variable",
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*attributes"},
{"tag": "Account", "path": "*cgreq.Account", "type": "*constant", "value": "*attributes"},
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
"value": "~*req.Service-Information.IN-Information.Real-Called-Number", "mandatory": true},
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Usage", "path": "Usage", "type": "*cc_usage", "mandatory": true,
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*cc_usage", "mandatory": true,
"value": "~*req.CC-Request-Number;~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/;5m"},
{"tag": "LastUsed", "path": "LastUsed", "type": "*variable",
{"tag": "LastUsed", "path": "*cgreq.LastUsed", "type": "*variable",
"value": "~*req.Used-Service-Unit.CC-Time:s/(.*)/${1}s/", "mandatory": true},
{"tag": "SubscriberID", "path": "SubscriberId", "type": "*variable",
{"tag": "SubscriberID", "path": "*cgreq.SubscriberId", "type": "*variable",
"value": "~*req.Subscription-Id.Subscription-Id-Data", "mandatory": true},
],
"reply_fields":[
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
"path": "Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "Result-Code", "type": "*constant", "value": "2001"},
"path": "*rep.Result-Code", "type": "*constant", "value": "5030", "blocker": true},
{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant", "value": "2001"},
],
},
],