Logic Op - File EDR

Overview

The File EDR operation is used to check the content of a generated EDR file output from a sequence of operations.

The file.edr operation allows for validation of a complete operations sequence.

Attributes

The operation attributes are as follows.

Attribute Type Description
type String file.edr
arguments Object [Required] The structure of the FileEdrArg we expect.
Expressions may be supplied within this structure.
tests Array of Object An array of anonymous Objects. Each Object represents a check to be performed. The associated Pass/Fail entries will be generated in the test instance check_log. Refer to the Operation Tests documentation for more information on the syntext for Operation tests.

Example

This is an example entry within the operations array:

 {
    "type": "file.edr",
    "arguments": {
        "match_fields": {
            "IDP_CLG": "{$v->{calling} . ':' . $v->{calling_noa}}"
        }
    },
    "tests": [
        { "kpath": "edrs.INITIALDP", "type": "size", "size": 1 },
        { "kpath": "edrs.INITIALDP.[0].CALLING", "value": "{$v->{calling}}" },
        { "kpath": "edrs.INITIALDP.[0].IDP_CLG", "value": "{$v->{calling} . ':' . $v->{calling_noa}}" },
        { "kpath": "edrs.INITIALDP.[0].CALLED", "value": "{$v->{called}}" },
        { "kpath": "edrs.INITIALDP.[0].IDP_CDB", "value": "{$v->{called} . ':' . $v->{called_noa}}" },
        { "kpath": "edrs.INITIALDP.[0].IDP_SK", "value": "30" },
        { "kpath": "edrs.INITIALDP.[0].IDP_CPC", "value": "0a" },
        { "kpath": "edrs.INITIALDP.[0].TRIGGER", "value": "ORIG" },

        { "kpath": "edrs.ANSWER", "type": "size", "size": 1 },
        { "kpath": "edrs.ANSWER.[0].EDP", "value": "oAnswer_leg2" },
        { "kpath": "edrs.ANSWER.[0].ONGOING", "value": 1 },

        { "kpath": "edrs.TEARDOWN", "type": "size", "size": 1 },
        { "kpath": "edrs.TEARDOWN.[0].EDP", "value": "oDisconnect_leg2" },
        { "kpath": "edrs.TEARDOWN.[0].REASON", "value": "EDP" },
        { "kpath": "edrs.TEARDOWN.[0].TALK_DS", "value": "544" },

        { "kpath": "edrs.TERMINATION", "type": "size", "size": 1 },
        { "kpath": "edrs.TERMINATION.[0].ARMED", "value": "4/5.2/6.2/7.2/10.1/9.1/9.2" },

        { "kpath": "edrs.DIAMETER", "type": "size", "size": 2 },

        { "kpath": "edrs.DIAMETER.[0].DIAMETER_SID", "type": "size", "size": 1 },
        { "kpath": "edrs.DIAMETER.[0].MSISDN", "value": "{$v->{calling}}" },
        { "kpath": "edrs.DIAMETER.[0].BEARER", "value": "voice" },
        { "kpath": "edrs.DIAMETER.[0].MSC", "value": "6421300400" },
        { "kpath": "edrs.DIAMETER.[0].VLR", "value": "6421200300" },
        { "kpath": "edrs.DIAMETER.[0].NETWORK", "value": "home" },
        { "kpath": "edrs.DIAMETER.[0].RC_ROOT", "value": "2001" },
        { "kpath": "edrs.DIAMETER.[0].RC_MSCC", "value": "2001" },
        { "kpath": "edrs.DIAMETER.[0].REQ_NUM", "value": "1" },
        { "kpath": "edrs.DIAMETER.[0].REQ_TYPE", "value": "1" },
        { "kpath": "edrs.DIAMETER.[0].RSU", "value": "600" },
        { "kpath": "edrs.DIAMETER.[0].GSU", "value": "600" },
        { "kpath": "edrs.DIAMETER.[0].USU", "type": "exists", "value": "0" },
        { "kpath": "edrs.DIAMETER.[0].TOTAL", "type": "exists", "value": "0" },
        { "kpath": "edrs.DIAMETER.[0].SCI", "value": "n2dsg_test@nsquared.nz" },
        { "kpath": "edrs.DIAMETER.[0].RG", "value": "10" },
        { "kpath": "edrs.DIAMETER.[0].SI", "value": "1" },

        { "kpath": "edrs.DIAMETER.[1].DIAMETER_SID", "type": "size", "size": 1 },
        { "kpath": "edrs.DIAMETER.[1].MSISDN", "value": "{$v->{calling}}" },
        { "kpath": "edrs.DIAMETER.[1].BEARER", "value": "voice" },
        { "kpath": "edrs.DIAMETER.[1].MSC", "value": "6421300400" },
        { "kpath": "edrs.DIAMETER.[1].VLR", "value": "6421200300" },
        { "kpath": "edrs.DIAMETER.[1].NETWORK", "value": "home" },
        { "kpath": "edrs.DIAMETER.[1].RC_ROOT", "value": "2001" },
        { "kpath": "edrs.DIAMETER.[1].RC_MSCC", "value": "2001" },
        { "kpath": "edrs.DIAMETER.[1].REQ_NUM", "value": "2" },
        { "kpath": "edrs.DIAMETER.[1].REQ_TYPE", "value": "3" },
        { "kpath": "edrs.DIAMETER.[1].RSU", "type": "exists", "value": "0" },
        { "kpath": "edrs.DIAMETER.[1].GSU", "type": "exists", "value": "0" },
        { "kpath": "edrs.DIAMETER.[1].USU", "value": "55" },
        { "kpath": "edrs.DIAMETER.[1].TOTAL", "value": "55" },
        { "kpath": "edrs.DIAMETER.[1].SCI", "value": "n2dsg_test@nsquared.nz" },
        { "kpath": "edrs.DIAMETER.[1].RG", "value": "10" },
        { "kpath": "edrs.DIAMETER.[1].SI", "value": "1" }
    ]
}

Arguments

The following inbound arguments are supported.

Argument Type Notes
directory String EDR file output director from which EDR records will be read.
Default is /tmp/edr.
stream_key String Stream key to use when attempting to load EDR files from the EDR output directory.
Default is n2svcd.
match_fields Object [Required] Object of fields to match. This acts as the search query across the generated EDR files to find the EDR record that matches the operation sequence that has been completed.