{ "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": [ "*authorize", "*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": "*variable", "value": "~*vars.RemoteHost:s/(.*):\\d+/${1}/", "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": ["*notempty:~*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": "*group", "value": "Val2", "mandatory": true}, ], }, ], }, ], }