Functional Configuration

Overview

In addition to Jarvis (webapp) configuration, N2ACD configuration is stored in JSON in the N2ACD database. To retrieve the N2ACD configuration directly, query the config_set database table:

SELECT config FROM n2acd.config_set

Only one record is stored in this table. That record holds the configuration for the overall platform. Structurally the configuration object is well-formed JSON with major subsections each holding data relevant to a particular part of the system.

An abbreviated example follows:

{
    "common": {
        "default_release_details_from_b_leg": false
        , "no_answer_timer": {
            "default": 15
            , "default_last": 15
            , "maximum": 90
        }
        , "node_types": {
            "Account Code Entry": {
                "edr_mask": true
                , "edr_write": false
            }
            , "Menu": {
                "suppressed_digits": []
            }
            , "PIN Authorisation": {
                "edr_mask": true
                , "edr_write": false
            }
            , "User Input": {
                "min_digits_min": 3
                , "min_digits_max": 5
                , "max_digits_min": 3
                , "max_digits_max": 5
            }
        }
        , "service": {
            "fields": {
                "bar_payphone_callers": {
                    "name"          : "Bar Payphone Callers"
                    , "client_type" : "boolean"
                }
                , "bar_cellphone_callers": {
                    "name"          : "Bar Cellphone Callers"
                    , "client_type" : "boolean"
                }
                , "follow_me_number": {
                    "name"               : "Follow Me Number"
                    , "client_type"      : "string"
                    , "format"           : "^[a-fA-F0-9]{0,32}$"
                    , "max_length"       : 32
                    , "validation_error" : "Follow Me Numbers may have up to 32 telephony digits (0-9 a-f A-F)."
                }
                , "toll_free_beeps_required": {
                    "name"          : "Toll Free Beeps Required"
                    , "client_type" : "boolean"
                }
                , "default_announcement_language_id": {
                    "name"          : "Language"
                    , "client_type" : "language"
                    , "none_text"   : "Customer Default"
                }
                , "pin": {
                    "name"               : "PIN"
                    , "client_type"      : "string"
                    , "format"           : "^[a-fA-F0-9]{1,12}$"
                    , "min_length"       : 1
                    , "max_length"       : 12
                    , "validation_error" : "PINs may have between 1 and 12 telephony digits (0-9 a-f A-F)."
                }
                , "schedule_override_flow_id": {
                    "name"          : "Override Flow"
                    , "client_type" : "flow"
                    , "none_text"   : "No Override Flow"
                }
                , "ignore_barring_list": {
                    "name"          : "Ignore Restrictions"
                    , "client_type" : "boolean"
                }
                , "restriction_list": {
                    "name"          : "Restriction List"
                    , "client_type" : "restrictionList"
                }
                , "allow_barring_list_digits": {
                    "name"          : "Restriction Type"
                    , "client_type" : "select"
                    , "values"      : [
                        { "id": false, "name": "Barred" }
                        , { "id": true, "name": "Allowed" }
                    ]
                }
            }
        }
        , "user_input_normalisation": [
            {
                "leading": "00"
                , "trim": 2
                , "prepend": ""
            }
        ]
    }
    , "frontend": {
        "default_parent_customer": 1
        , "flow_editor_site": "https://localhost/n2acd-fe"
        , "restrict_announcement_search": false
        , "show_start_node": true
        , "display_timezones": [
            {
                "name": "New Zealand"
                , "value": "Pacific/Auckland"
                , "default": true
            }
        ]
        , "node_types": {
            "Business Hours": {
                "allow_caller_timezone": false
                , "timezone_list": "display"
            }
            , "Cellsite Routing": {
                "cellsites": [
                    "AKL"
                    , "WLG"
                    , "CHCH"
                ]
            }
            , "Connect": {
                "single_number_only": false
            }
            , "End Call": {
                "reasons": [
                    { "key": "route_select_failure",    "description": "route select failure (INAP 3 / SIP 404)" }
                    , { "key": "busy",                  "description": "busy (INAP 17 / SIP 486)" }
                    , { "key": "no_answer",             "description": "no answer (INAP 19 / SIP 480)" }
                    , { "key": "normal_unspecified",    "description": "normal, unspecified (INAP 31 / SIP 603)" }
                ]
            }
            , "Menu": {
                "exit_render_rule": "hide_empty"
            }
            , "Proportional Distribution": {
                "exit_name_type": "percentage"
                , "default_proportion_value": 50
            }
        }
        , "user_buffers": [
            {
                "id": "user.buffer1"
                , "name": "Postcode"
            }
        ]
        , "user_counters": [
            {
                "id": "user.counter1"
                , "name": "Loop Counter 1"
            }
        ]
    }
    , "scp": {
        "generate_lua": true
        , "node_types": {
            "Caller Type": {
                "international": [ 11 ]
                , "landline": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254 ]
                , "mobile": [ 10 ]
                , "payphone": [ 15 ]
            }
            , "Cellsite Routing": {
                "AKL": [ 9001 ]
                , "CHCH": [ 9000, 9003 ]
                , "WLG": [ 9002 ]
                , "UNK": [ 9005 ]
            }
            , "End Call": {
                "reasons": [
                    { "key": "route_select_failure",    "cause": 3 }
                    , { "key": "busy",                  "cause": 17 }
                    , { "key": "no_answer",             "cause": 19 }
                    , { "key": "normal_unspecified",    "cause": 31 }
                ]
            }
        }
    }
    , "sip": {
        "generate_lua": false
        , "node_types": {
            "Caller Type": {
                "international": [ "00" ]
                , "landline": [ "03", "04", "06", "07", "09" ]
                , "mobile": [ "02" ]
            }
            , "End Call": {
                "reasons": [
                    { "key": "route_select_failure",    "code": 404 }
                    , { "key": "busy",                  "code": 486 }
                    , { "key": "no_answer",             "code": 480 }
                    , { "key": "normal_unspecified",    "code": 603 }
                ]
            }
        }
        , "response_codes": {
            "default": "RSF"
            , "404": "RSF"
            , "480": "NO_ANSWER"
            , "486": "BUSY"
        }
    }
}

The JSON configuration object contains the following sections:

Section Purpose
common Configuration relevant for both INAP and SIP-based call control, and/or both frontend and backend components. For example, this includes configuration used to validate flows in the flow editor, that is also used for server-side flow validation within the API. It also includes runtime configuration that is not protocol-specific. Common configuration is documented in the common page.
frontend Configuration exclusively applicable to the flow editor and administration GUIs. Frontend configuration is documented in the frontend page.
scp Configuration exclusively applicable to the runtime component of INAP-based call control. This primarily consists of protocol-specific mappings for call control concepts. SCP configuration is documented in the SCP page.
sip Configuration exclusively applicable to the runtime component of SIP-based call control. This primarily consists of protocol-specific mappings for call control concepts. SIP configuration is documented in the SIP page.