Files
cgrates/data/conf/samples/httpagent/httpagent.json
2018-08-30 11:40:06 +02:00

89 lines
3.3 KiB
JSON

{
"http_agent": [
{
"id": "conecto1",
"url": "/conecto",
"sessions_conns": [
{"address": "*internal"}
],
"tenant": "cgrates.org",
"timezone": "",
"request_payload": "*url",
"reply_payload": "*xml",
"request_processors": [
{
"id": "OutboundAUTHDryRun",
"filters": ["*string:*req.request_type:OutboundAUTH","*string:*req.Msisdn:497700056231"],
"flags": ["*dryrun"],
"continue_on_success": false,
"request_fields":[
],
"reply_fields":[
{"id": "Allow", "field_id": "response.Allow", "type": "*constant",
"value": "1", "mandatory": true},
{"id": "MaxDuration", "field_id": "response.MaxDuration", "type": "*constant",
"value": "1200", "blocker": true},
{"id": "Unused", "field_id": "response.Unused", "type": "*constant",
"value": "0"},
],
},
{
"id": "OutboundAUTH",
"filters": ["*string:*req.request_type:OutboundAUTH"],
"flags": [ "*auth", "*accounts", "*attributes"],
"continue_on_success": false,
"request_fields":[
{"id": "RequestType", "field_id": "RequestType", "type": "*constant",
"value": "*pseudoprepaid", "mandatory": true},
{"id": "OriginID", "field_id": "OriginID", "type": "*composed",
"value": "~*req.CallID", "mandatory": true},
{"id": "Account", "field_id": "Account", "type": "*composed",
"value": "~*req.Msisdn", "mandatory": true},
{"id": "Destination", "field_id": "Destination", "type": "*composed",
"value": "~*req.Destination", "mandatory": true},
{"id": "SetupTime", "field_id": "SetupTime", "type": "*constant",
"value": "*now", "mandatory": true},
],
"reply_fields":[
{"id": "Allow", "field_id": "response.Allow", "type": "*constant",
"value": "1", "mandatory": true},
{"id": "MaxDuration", "field_id": "response.MaxDuration", "type": "*composed",
"value": "~*cgrep.MaxUsage{*duration_seconds}", "mandatory": true},
],
},
{
"id": "mtcall_cdr",
"filters": ["*string:*req.request_type:MTCALL_CDR"],
"flags": ["*dryrun", "*cdrs"],
"continue_on_success": false,
"request_fields":[
{"id": "RequestType", "field_id": "RequestType", "type": "*constant",
"value": "*pseudoprepaid", "mandatory": true},
{"id": "OriginID", "field_id": "OriginID", "type": "*composed",
"value": "~*req.CDR_ID", "mandatory": true},
{"id": "Account", "field_id": "Account", "type": "*composed",
"value": "~*req.msisdn", "mandatory": true},
{"id": "Destination", "field_id": "Destination", "type": "*composed",
"value": "~*req.destination", "mandatory": true},
{"id": "SetupTime", "field_id": "SetupTime", "type": "*composed",
"value": "~*req.timestamp", "mandatory": true},
{"id": "AnswerTime", "field_id": "SetupTime", "type": "*composed",
"value": "~*req.timestamp", "mandatory": true},
{"id": "Usage", "field_id": "Usage", "type": "*composed",
"value": "~*req.leg_duration;^s", "mandatory": true},
],
"reply_fields":[
{"id": "CDR_ID", "field_id": "CDR_RESPONSE.CDR_ID", "type": "*composed",
"value": "~*req.CDR_ID", "mandatory": true},
{"id": "CDR_STATUS", "field_id": "CDR_RESPONSE.CDR_STATUS", "type": "*constant",
"value": "1", "mandatory": true},
],
}
],
},
],
}