{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Dial step",
    "type": "object",
    "properties": {
        "name": {
            "type": "string"
        },
        "kind": {
            "enum": [
                "dial"
            ]
        },
        "label": {
            "type": "string"
        },
        "title": {
            "type": "string"
        },
        "method": {
            "enum": [
                "GET",
                "POST"
            ]
        },
        "timeout": {
            "type": "integer"
        },
        "timeLimit": {
            "type": "integer"
        },
        "callerId": {
            "type": "string"
        },
        "record": {
            "type": "boolean"
        },
        "dialNouns": {
            "type": "array",
            "items": {
                "type": "object",
                "oneOf": [
                    {
                        "$ref": "#/definitions/numberNoun"
                    },
                    {
                        "$ref": "#/definitions/clientNoun"
                    },
                    {
                        "$ref": "#/definitions/conferenceNoun"
                    },
                    {
                        "$ref": "#/definitions/sipuriNoun"
                    }
                ]
            }
        },
        "nextModule": {
            "type": "string"
        },
        "iface": {
            "type": "object"
        }
    },
    "required": [
        "name",
        "kind",
        "label",
        "title",
        "dialNouns"
    ],
    "definitions": {
        "numberNoun": {
            "type": "object",
            "properties": {
                "dialType": {
                    "enum": [
                        "number"
                    ]
                },
                "destination": {
                    "type": "string"
                },
                "sendDigits": {
                    "type": "string",
                    "minLength": 1
                },
                "beforeConnectModule": {
                    "type": "string",
                    "minLength": 1
                },
                "iface": {
                    "type": "object"
                }
            },
            "required": [
                "dialType",
                "destination"
            ],
            "additionalProperties": false
        },
        "clientNoun": {
            "type": "object",
            "properties": {
                "dialType": {
                    "enum": [
                        "client"
                    ]
                },
                "destination": {
                    "type": "string"
                },
                "iface": {
                    "type": "object"
                }
            },
            "required": [
                "dialType",
                "destination"
            ],
            "additionalProperties": false
        },
        "conferenceNoun": {
            "type": "object",
            "properties": {
                "dialType": {
                    "enum": [
                        "conference"
                    ]
                },
                "destination": {
                    "type": "string"
                },
                "nextModule": {
                    "type": "string",
                    "minLength": 1
                },
                "muted": {
                    "type": "boolean"
                },
                "beep": {
                    "type": "boolean"
                },
                "startConferenceOnEnter": {
                    "type": "boolean"
                },
                "endConferenceOnExit": {
                    "type": "boolean"
                },
                "waitUrl": {
                    "type": "string",
                    "minLength": 1
                },
                "waitModule": {
                    "type": "string",
                    "minLength": 1
                },
                "waitMethod": {
                    "enum": [
                        "GET",
                        "POST"
                    ]
                },
                "maxParticipants": {
                    "type": "integer"
                },
                "iface": {
                    "type": "object"
                }
            },
            "required": [
                "dialType",
                "destination"
            ],
            "additionalProperties": false
        },
        "sipuriNoun": {
            "type": "object",
            "properties": {
                "dialType": {
                    "enum": [
                        "sipuri"
                    ]
                },
                "destination": {
                    "type": "string"
                },
                "iface": {
                    "type": "object"
                }
            },
            "required": [
                "dialType",
                "destination"
            ],
            "additionalProperties": false
        }
    }
}