mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-12 10:36:24 +05:00
168 lines
6.7 KiB
JSON
168 lines
6.7 KiB
JSON
{
|
|
|
|
|
|
"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", "field_id": "response.Allow", "type": "*constant",
|
|
"value": "1", "mandatory": true},
|
|
{"tag": "Concatenated1", "field_id": "response.Concatenated", "type": "*composed",
|
|
"value": "~*req.MCC;/", "mandatory": true},
|
|
{"tag": "Concatenated2", "field_id": "response.Concatenated", "type": "*composed",
|
|
"value": "Val1"},
|
|
{"tag": "MaxDuration", "field_id": "response.MaxDuration", "type": "*constant",
|
|
"value": "1200", "blocker": true},
|
|
{"tag": "Unused", "field_id": "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", "field_id": "Category", "type": "*constant", "value": "call"},
|
|
{"tag": "RequestType", "field_id": "RequestType", "type": "*constant",
|
|
"value": "*pseudoprepaid", "mandatory": true},
|
|
{"tag": "OriginID", "field_id": "OriginID", "type": "*composed",
|
|
"value": "~*req.CallID", "mandatory": true},
|
|
{"tag": "Account", "field_id": "Account", "type": "*composed",
|
|
"value": "~*req.Msisdn", "mandatory": true},
|
|
{"tag": "Destination", "field_id": "Destination", "type": "*composed",
|
|
"value": "~*req.Destination", "mandatory": true},
|
|
{"tag": "SetupTime", "field_id": "SetupTime", "type": "*constant",
|
|
"value": "*now", "mandatory": true},
|
|
],
|
|
"reply_fields":[
|
|
{"tag": "Allow", "field_id": "response.Allow", "type": "*constant",
|
|
"value": "1", "mandatory": true},
|
|
{"tag": "MaxDuration", "field_id": "response.MaxDuration", "type": "*composed",
|
|
"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", "field_id": "RequestType", "type": "*constant",
|
|
"value": "*pseudoprepaid", "mandatory": true},
|
|
{"tag": "OriginID", "field_id": "OriginID", "type": "*composed",
|
|
"value": "~*req.CDR_ID", "mandatory": true},
|
|
{"tag": "OriginHost", "field_id": "OriginHost", "type": "*remote_host",
|
|
"mandatory": true},
|
|
{"tag": "Account", "field_id": "Account", "type": "*composed",
|
|
"value": "~*req.msisdn", "mandatory": true},
|
|
{"tag": "Destination", "field_id": "Destination", "type": "*composed",
|
|
"value": "~*req.destination", "mandatory": true},
|
|
{"tag": "SetupTime", "field_id": "SetupTime", "type": "*variable",
|
|
"value": "~*req.timestamp", "mandatory": true},
|
|
{"tag": "AnswerTime", "field_id": "AnswerTime", "type": "*variable",
|
|
"value": "~*req.timestamp", "mandatory": true},
|
|
{"tag": "Usage", "field_id": "Usage", "type": "*composed",
|
|
"value": "~*req.leg_duration;s", "mandatory": true},
|
|
],
|
|
"reply_fields":[
|
|
{"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
|
|
"field_id": "CDR_RESPONSE.RESULT_CODE", "type": "*composed", "value": "~*cgrep.Error", "blocker": true},
|
|
{"tag": "CDR_ID", "field_id": "CDR_RESPONSE.CDR_ID", "type": "*composed",
|
|
"value": "~*req.CDR_ID", "mandatory": true},
|
|
{"tag": "CDR_STATUS", "field_id": "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", "field_id": "ToR", "type": "*constant",
|
|
"value": "*data", "mandatory": true},
|
|
{"tag": "RequestType", "field_id": "RequestType", "type": "*constant",
|
|
"value": "*pseudoprepaid", "mandatory": true},
|
|
{"tag": "OriginID", "field_id": "OriginID", "type": "*composed",
|
|
"value": "~*req.complete-datasession-notification.customerid", "mandatory": true},
|
|
{"tag": "Account", "field_id": "Account", "type": "*composed",
|
|
"value": "~*req.complete-datasession-notification.username", "mandatory": true},
|
|
{"tag": "Destination", "field_id": "Destination", "type": "*composed",
|
|
"value": "~*req.complete-datasession-notification.userid", "mandatory": true},
|
|
{"tag": "SetupTime", "field_id": "SetupTime", "type": "*composed",
|
|
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
|
{"tag": "AnswerTime", "field_id": "AnswerTime", "type": "*composed",
|
|
"value": "~*req.complete-datasession-notification.createtime", "mandatory": true},
|
|
{"tag": "Usage", "field_id": "Usage", "type": "*composed",
|
|
"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"],
|
|
"request_fields":[
|
|
],
|
|
"reply_fields":[
|
|
{"tag": "Field1", "field_id": "Variable1", "type": "*variable",
|
|
"value": "Hola1", "mandatory": true},
|
|
{"tag": "Field2", "field_id": "Variable2", "type": "*variable",
|
|
"value": "Hola2", "mandatory": true},
|
|
{"tag": "Field3", "field_id": "ComposedVar", "type": "*composed",
|
|
"value": "Test", "mandatory": true},
|
|
{"tag": "Field4", "field_id": "ComposedVar", "type": "*composed",
|
|
"value": "Composed", "mandatory": true},
|
|
{"tag": "Field5", "field_id": "Item1.1", "type": "*variable",
|
|
"value": "Val1", "mandatory": true},
|
|
],
|
|
"continue": true,
|
|
},
|
|
{
|
|
"id": "TextPlainDryRun2",
|
|
"filters": ["*string:~*req.request_type:TextPlainDryRun","*string:~*req.Msisdn:497700056231"],
|
|
"tenant": "cgrates.org",
|
|
"flags": ["*dryrun"],
|
|
"request_fields":[],
|
|
"reply_fields":[
|
|
{"tag": "Field1", "field_id": "Item1.1", "type": "*variable",
|
|
"value": "Val2", "mandatory": true},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
|
|
|
|
} |