mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Update integration test for HTTPAgent
This commit is contained in:
committed by
Dan Christian Bogos
parent
1de1222698
commit
5537edf20b
@@ -109,7 +109,7 @@ func (ha *HTTPAgent) processRequest(reqProcessor *config.RequestProcessor,
|
||||
reqProcessor.Filters, agReq); err != nil || !pass {
|
||||
return pass, err
|
||||
}
|
||||
if agReq.CGRRequest, err = agReq.AsNavigableMap(reqProcessor.RequestFields); err != nil {
|
||||
if err = agReq.SetFields(reqProcessor.RequestFields); err != nil {
|
||||
return
|
||||
}
|
||||
cgrEv := agReq.CGRRequest.AsCGREvent(agReq.Tenant, utils.NestingSep)
|
||||
@@ -268,10 +268,8 @@ func (ha *HTTPAgent) processRequest(reqProcessor *config.RequestProcessor,
|
||||
agReq.CGRReply.Set([]string{utils.Error}, err.Error(), false, false)
|
||||
}
|
||||
}
|
||||
if nM, err := agReq.AsNavigableMap(reqProcessor.ReplyFields); err != nil {
|
||||
if err := agReq.SetFields(reqProcessor.ReplyFields); err != nil {
|
||||
return false, err
|
||||
} else {
|
||||
agReq.Reply.Merge(nM)
|
||||
}
|
||||
if reqProcessor.Flags.HasKey(utils.MetaLog) {
|
||||
utils.Logger.Info(
|
||||
|
||||
@@ -17,15 +17,15 @@
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "response.Concatenated", "type": "*composed",
|
||||
{"tag": "Concatenated1", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "response.Concatenated", "type": "*composed",
|
||||
{"tag": "Concatenated2", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*constant",
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "response.Unused", "type": "*constant",
|
||||
{"tag": "Unused", "path": "*rep.response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
@@ -35,22 +35,22 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*constant",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*variable",
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -60,29 +60,29 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"path": "*rep.CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "*rep.CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
{"tag": "CDR_STATUS", "path": "*rep.CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
@@ -100,21 +100,21 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant",
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
@@ -136,15 +136,15 @@
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Variable1", "type": "*variable",
|
||||
{"tag": "Field1", "path": "*rep.Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "Variable2", "type": "*variable",
|
||||
{"tag": "Field2", "path": "*rep.Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "ComposedVar", "type": "*composed",
|
||||
{"tag": "Field3", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "ComposedVar", "type": "*composed",
|
||||
{"tag": "Field4", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "Item1.1", "type": "*variable",
|
||||
{"tag": "Field5", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -155,7 +155,7 @@
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Item1.1", "type": "*variable",
|
||||
{"tag": "Field1", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -17,15 +17,15 @@
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*constant",
|
||||
{"tag": "Concatenated1", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "response.Unused", "type": "*constant",
|
||||
{"tag": "Unused", "path": "*rep.response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
@@ -35,22 +35,22 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*constant",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*variable",
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -60,29 +60,29 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"path": "*rep.CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "*rep.CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
{"tag": "CDR_STATUS", "path": "*rep.CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
@@ -100,21 +100,21 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
@@ -136,15 +136,15 @@
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Variable1", "type": "*variable",
|
||||
{"tag": "Field1", "path": "*rep.Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "Variable2", "type": "*variable",
|
||||
{"tag": "Field2", "path": "*rep.Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "ComposedVar", "type": "*composed",
|
||||
{"tag": "Field3", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "ComposedVar", "type": "*composed",
|
||||
{"tag": "Field4", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "Item1.1", "type": "*variable",
|
||||
{"tag": "Field5", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -155,7 +155,7 @@
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Item1.1", "type": "*variable",
|
||||
{"tag": "Field1", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -164,4 +164,4 @@
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -17,15 +17,15 @@
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*constant",
|
||||
{"tag": "Concatenated1", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "response.Unused", "type": "*constant",
|
||||
{"tag": "Unused", "path": "*rep.response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
@@ -35,22 +35,22 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*constant",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*variable",
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -60,29 +60,29 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"path": "*rep.CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "*rep.CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
{"tag": "CDR_STATUS", "path": "*rep.CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
@@ -100,21 +100,21 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
@@ -136,15 +136,15 @@
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Variable1", "type": "*variable",
|
||||
{"tag": "Field1", "path": "*rep.Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "Variable2", "type": "*variable",
|
||||
{"tag": "Field2", "path": "*rep.Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "ComposedVar", "type": "*composed",
|
||||
{"tag": "Field3", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "ComposedVar", "type": "*composed",
|
||||
{"tag": "Field4", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "Item1.1", "type": "*variable",
|
||||
{"tag": "Field5", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -155,7 +155,7 @@
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Item1.1", "type": "*variable",
|
||||
{"tag": "Field1", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -164,4 +164,4 @@
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -17,15 +17,15 @@
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*constant",
|
||||
{"tag": "Concatenated1", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "response.Unused", "type": "*constant",
|
||||
{"tag": "Unused", "path": "*rep.response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
@@ -35,22 +35,22 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*constant",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*variable",
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -60,29 +60,29 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"path": "*rep.CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "*rep.CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
{"tag": "CDR_STATUS", "path": "*rep.CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
@@ -100,21 +100,21 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
@@ -136,15 +136,15 @@
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Variable1", "type": "*variable",
|
||||
{"tag": "Field1", "path": "*rep.Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "Variable2", "type": "*variable",
|
||||
{"tag": "Field2", "path": "*rep.Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "ComposedVar", "type": "*composed",
|
||||
{"tag": "Field3", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "ComposedVar", "type": "*composed",
|
||||
{"tag": "Field4", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "Item1.1", "type": "*variable",
|
||||
{"tag": "Field5", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -155,7 +155,7 @@
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Item1.1", "type": "*variable",
|
||||
{"tag": "Field1", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -164,4 +164,4 @@
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -17,15 +17,15 @@
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*constant",
|
||||
{"tag": "Concatenated1", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "response.Unused", "type": "*constant",
|
||||
{"tag": "Unused", "path": "*rep.response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
@@ -35,22 +35,22 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*constant",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*variable",
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -60,29 +60,29 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"path": "*rep.CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "*rep.CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
{"tag": "CDR_STATUS", "path": "*rep.CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
@@ -100,21 +100,21 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
@@ -136,15 +136,15 @@
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Variable1", "type": "*variable",
|
||||
{"tag": "Field1", "path": "*rep.Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "Variable2", "type": "*variable",
|
||||
{"tag": "Field2", "path": "*rep.Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "ComposedVar", "type": "*composed",
|
||||
{"tag": "Field3", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "ComposedVar", "type": "*composed",
|
||||
{"tag": "Field4", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "Item1.1", "type": "*variable",
|
||||
{"tag": "Field5", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -155,7 +155,7 @@
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Item1.1", "type": "*variable",
|
||||
{"tag": "Field1", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -164,4 +164,4 @@
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -17,15 +17,15 @@
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*constant",
|
||||
{"tag": "Concatenated1", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "response.Unused", "type": "*constant",
|
||||
{"tag": "Unused", "path": "*rep.response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
@@ -35,22 +35,22 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*constant",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*variable",
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -60,29 +60,29 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"path": "*rep.CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "*rep.CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
{"tag": "CDR_STATUS", "path": "*rep.CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
@@ -100,21 +100,21 @@
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
@@ -136,15 +136,15 @@
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Variable1", "type": "*variable",
|
||||
{"tag": "Field1", "path": "*rep.Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "Variable2", "type": "*variable",
|
||||
{"tag": "Field2", "path": "*rep.Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "ComposedVar", "type": "*composed",
|
||||
{"tag": "Field3", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "ComposedVar", "type": "*composed",
|
||||
{"tag": "Field4", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "Item1.1", "type": "*variable",
|
||||
{"tag": "Field5", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -155,7 +155,7 @@
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Item1.1", "type": "*variable",
|
||||
{"tag": "Field1", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
@@ -164,4 +164,4 @@
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
333
data/conf/samples/httpagenttls_internal/httpagent.json
Executable file → Normal file
333
data/conf/samples/httpagenttls_internal/httpagent.json
Executable file → Normal file
@@ -1,168 +1,167 @@
|
||||
{
|
||||
|
||||
|
||||
"http_agent": [
|
||||
{
|
||||
"id": "conecto1",
|
||||
"url": "/conecto",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "OutboundAUTHDryRun",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "OutboundAUTH",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "mtcall_cdr",
|
||||
"filters": ["*string:~*req.request_type:MTCALL_CDR"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "conecto_xml",
|
||||
"url": "/conecto_xml",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*xml",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "cdr_from_xml",
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "textplain",
|
||||
"url": "/textplain",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*text_plain",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "TextPlainDryRun",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun","*continue"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "TextPlainDryRun2",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
{
|
||||
|
||||
|
||||
"http_agent": [
|
||||
{
|
||||
"id": "conecto1",
|
||||
"url": "/conecto",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "OutboundAUTHDryRun",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "*rep.response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "OutboundAUTH",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "mtcall_cdr",
|
||||
"filters": ["*string:~*req.request_type:MTCALL_CDR"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "*rep.CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "*rep.CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "*rep.CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "conecto_xml",
|
||||
"url": "/conecto_xml",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*xml",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "cdr_from_xml",
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "textplain",
|
||||
"url": "/textplain",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*text_plain",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "TextPlainDryRun",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun","*continue"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "*rep.Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "*rep.Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "TextPlainDryRun2",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
335
data/conf/samples/httpagenttls_internal_gob/httpagent.json
Executable file → Normal file
335
data/conf/samples/httpagenttls_internal_gob/httpagent.json
Executable file → Normal file
@@ -1,168 +1,167 @@
|
||||
{
|
||||
|
||||
|
||||
"http_agent": [
|
||||
{
|
||||
"id": "conecto1",
|
||||
"url": "/conecto",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "OutboundAUTHDryRun",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "OutboundAUTH",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "mtcall_cdr",
|
||||
"filters": ["*string:~*req.request_type:MTCALL_CDR"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "conecto_xml",
|
||||
"url": "/conecto_xml",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*xml",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "cdr_from_xml",
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "textplain",
|
||||
"url": "/textplain",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*text_plain",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "TextPlainDryRun",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun","*continue"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "TextPlainDryRun2",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
{
|
||||
|
||||
|
||||
"http_agent": [
|
||||
{
|
||||
"id": "conecto1",
|
||||
"url": "/conecto",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "OutboundAUTHDryRun",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "*rep.response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "OutboundAUTH",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "mtcall_cdr",
|
||||
"filters": ["*string:~*req.request_type:MTCALL_CDR"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "*rep.CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "*rep.CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "*rep.CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "conecto_xml",
|
||||
"url": "/conecto_xml",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*xml",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "cdr_from_xml",
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "textplain",
|
||||
"url": "/textplain",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*text_plain",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "TextPlainDryRun",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun","*continue"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "*rep.Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "*rep.Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "TextPlainDryRun2",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
335
data/conf/samples/httpagenttls_mongo/httpagent.json
Executable file → Normal file
335
data/conf/samples/httpagenttls_mongo/httpagent.json
Executable file → Normal file
@@ -1,168 +1,167 @@
|
||||
{
|
||||
|
||||
|
||||
"http_agent": [
|
||||
{
|
||||
"id": "conecto1",
|
||||
"url": "/conecto",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "OutboundAUTHDryRun",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "OutboundAUTH",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "mtcall_cdr",
|
||||
"filters": ["*string:~*req.request_type:MTCALL_CDR"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "conecto_xml",
|
||||
"url": "/conecto_xml",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*xml",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "cdr_from_xml",
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "textplain",
|
||||
"url": "/textplain",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*text_plain",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "TextPlainDryRun",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun","*continue"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "TextPlainDryRun2",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
{
|
||||
|
||||
|
||||
"http_agent": [
|
||||
{
|
||||
"id": "conecto1",
|
||||
"url": "/conecto",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "OutboundAUTHDryRun",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "*rep.response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "OutboundAUTH",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "mtcall_cdr",
|
||||
"filters": ["*string:~*req.request_type:MTCALL_CDR"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "*rep.CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "*rep.CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "*rep.CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "conecto_xml",
|
||||
"url": "/conecto_xml",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*xml",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "cdr_from_xml",
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "textplain",
|
||||
"url": "/textplain",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*text_plain",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "TextPlainDryRun",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun","*continue"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "*rep.Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "*rep.Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "TextPlainDryRun2",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
335
data/conf/samples/httpagenttls_mongo_gob/httpagent.json
Executable file → Normal file
335
data/conf/samples/httpagenttls_mongo_gob/httpagent.json
Executable file → Normal file
@@ -1,168 +1,167 @@
|
||||
{
|
||||
|
||||
|
||||
"http_agent": [
|
||||
{
|
||||
"id": "conecto1",
|
||||
"url": "/conecto",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "OutboundAUTHDryRun",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "OutboundAUTH",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "mtcall_cdr",
|
||||
"filters": ["*string:~*req.request_type:MTCALL_CDR"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "conecto_xml",
|
||||
"url": "/conecto_xml",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*xml",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "cdr_from_xml",
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "textplain",
|
||||
"url": "/textplain",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*text_plain",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "TextPlainDryRun",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun","*continue"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "TextPlainDryRun2",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
{
|
||||
|
||||
|
||||
"http_agent": [
|
||||
{
|
||||
"id": "conecto1",
|
||||
"url": "/conecto",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "OutboundAUTHDryRun",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "*rep.response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "OutboundAUTH",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "mtcall_cdr",
|
||||
"filters": ["*string:~*req.request_type:MTCALL_CDR"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "*rep.CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "*rep.CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "*rep.CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "conecto_xml",
|
||||
"url": "/conecto_xml",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*xml",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "cdr_from_xml",
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "textplain",
|
||||
"url": "/textplain",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*text_plain",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "TextPlainDryRun",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun","*continue"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "*rep.Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "*rep.Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "TextPlainDryRun2",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
335
data/conf/samples/httpagenttls_mysql/httpagent.json
Executable file → Normal file
335
data/conf/samples/httpagenttls_mysql/httpagent.json
Executable file → Normal file
@@ -1,168 +1,167 @@
|
||||
{
|
||||
|
||||
|
||||
"http_agent": [
|
||||
{
|
||||
"id": "conecto1",
|
||||
"url": "/conecto",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "OutboundAUTHDryRun",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "OutboundAUTH",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "mtcall_cdr",
|
||||
"filters": ["*string:~*req.request_type:MTCALL_CDR"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "conecto_xml",
|
||||
"url": "/conecto_xml",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*xml",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "cdr_from_xml",
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "textplain",
|
||||
"url": "/textplain",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*text_plain",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "TextPlainDryRun",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun","*continue"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "TextPlainDryRun2",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
{
|
||||
|
||||
|
||||
"http_agent": [
|
||||
{
|
||||
"id": "conecto1",
|
||||
"url": "/conecto",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "OutboundAUTHDryRun",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "*rep.response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "OutboundAUTH",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "mtcall_cdr",
|
||||
"filters": ["*string:~*req.request_type:MTCALL_CDR"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "*rep.CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "*rep.CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "*rep.CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "conecto_xml",
|
||||
"url": "/conecto_xml",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*xml",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "cdr_from_xml",
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "textplain",
|
||||
"url": "/textplain",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*text_plain",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "TextPlainDryRun",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun","*continue"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "*rep.Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "*rep.Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "TextPlainDryRun2",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
335
data/conf/samples/httpagenttls_mysql_gob/httpagent.json
Executable file → Normal file
335
data/conf/samples/httpagenttls_mysql_gob/httpagent.json
Executable file → Normal file
@@ -1,168 +1,167 @@
|
||||
{
|
||||
|
||||
|
||||
"http_agent": [
|
||||
{
|
||||
"id": "conecto1",
|
||||
"url": "/conecto",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "OutboundAUTHDryRun",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "OutboundAUTH",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "mtcall_cdr",
|
||||
"filters": ["*string:~*req.request_type:MTCALL_CDR"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "conecto_xml",
|
||||
"url": "/conecto_xml",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*xml",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "cdr_from_xml",
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "textplain",
|
||||
"url": "/textplain",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*text_plain",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "TextPlainDryRun",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun","*continue"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "TextPlainDryRun2",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
{
|
||||
|
||||
|
||||
"http_agent": [
|
||||
{
|
||||
"id": "conecto1",
|
||||
"url": "/conecto",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "OutboundAUTHDryRun",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "Concatenated1", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "~*req.MCC;/", "mandatory": true},
|
||||
{"tag": "Concatenated2", "path": "*rep.response.Concatenated", "type": "*composed",
|
||||
"value": "Val1"},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*constant",
|
||||
"value": "1200", "blocker": true},
|
||||
{"tag": "Unused", "path": "*rep.response.Unused", "type": "*constant",
|
||||
"value": "0"},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "OutboundAUTH",
|
||||
"filters": ["*string:~*req.request_type:OutboundAUTH"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": [ "*auth", "*accounts", "*attributes"],
|
||||
"request_fields":[
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call"},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CallID", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.Msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.Destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*constant",
|
||||
"value": "*now", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Allow", "path": "*rep.response.Allow", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
{"tag": "MaxDuration", "path": "*rep.response.MaxDuration", "type": "*variable",
|
||||
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "mtcall_cdr",
|
||||
"filters": ["*string:~*req.request_type:MTCALL_CDR"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*remote_host",
|
||||
"mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.msisdn", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.destination", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.timestamp", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.leg_duration;s", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
||||
"path": "*rep.CDR_RESPONSE.RESULT_CODE", "type": "*variable", "value": "~*cgrep.Error", "blocker": true},
|
||||
{"tag": "CDR_ID", "path": "*rep.CDR_RESPONSE.CDR_ID", "type": "*variable",
|
||||
"value": "~*req.CDR_ID", "mandatory": true},
|
||||
{"tag": "CDR_STATUS", "path": "*rep.CDR_RESPONSE.CDR_STATUS", "type": "*constant",
|
||||
"value": "1", "mandatory": true},
|
||||
],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "conecto_xml",
|
||||
"url": "/conecto_xml",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*xml",
|
||||
"reply_payload": "*xml",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "cdr_from_xml",
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*cdrs"],
|
||||
"request_fields":[
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant",
|
||||
"value": "*data", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant",
|
||||
"value": "*pseudoprepaid", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable",
|
||||
"value": "~*req.complete-datasession-notification.callleg.bytes", "mandatory": true},
|
||||
],
|
||||
"reply_fields":[],
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "textplain",
|
||||
"url": "/textplain",
|
||||
"sessions_conns": ["*localhost"],
|
||||
"request_payload": "*url",
|
||||
"reply_payload": "*text_plain",
|
||||
"request_processors": [
|
||||
{
|
||||
"id": "TextPlainDryRun",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun","*continue"],
|
||||
"request_fields":[
|
||||
],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "*rep.Variable1", "type": "*variable",
|
||||
"value": "Hola1", "mandatory": true},
|
||||
{"tag": "Field2", "path": "*rep.Variable2", "type": "*variable",
|
||||
"value": "Hola2", "mandatory": true},
|
||||
{"tag": "Field3", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Test", "mandatory": true},
|
||||
{"tag": "Field4", "path": "*rep.ComposedVar", "type": "*composed",
|
||||
"value": "Composed", "mandatory": true},
|
||||
{"tag": "Field5", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val1", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "TextPlainDryRun2",
|
||||
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
||||
"tenant": "cgrates.org",
|
||||
"flags": ["*dryrun"],
|
||||
"request_fields":[],
|
||||
"reply_fields":[
|
||||
{"tag": "Field1", "path": "*rep.Item1.1", "type": "*variable",
|
||||
"value": "Val2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user