API Version: 6.3

User

Permissions

Requires System-Admin or Company-Admin permissions.

command 'read'

Path: /rest/dialplan/read/
Note 1) If a column name of owner is specified in the columns specifier, it will be filled with the contact ID of the owner of the extension, or null if there is none.
Note 2) The scoped_exten scope value is artificial, and is constructed on-the-fly. The code will attempt to optimise the query but this is a heavier operation than querying virt_exten.
Available columns are:
virt_exten	: The base extension name or number
company		: The company id this extensions exists in
scoped_exten	: Either 'extension' or 'extension_company' (The latter for private extensions)
owner		: The contact ID of the extension's owner
name		: The extensions' name
ring_type	: The type of extension eg 'A'll, 'H'unt, 'Q'ueue, 'C'onference, soft'F'ax
callerid	: CallerID override. A prefix of '-' means withheld
ring_time	: Ring duration, or null for global default
{
    "type": "extension",
    "scope": {
        "virt_exten": ["extension numbers", ...],        // eg "400"
        "scoped_exten": ["scoped extension numbers", ...],    // eg "400_company"
        "company": "company"
    },
    "columns": [
        "column name",
        ...
    ]
}
The return value is of the form:
{
    "result": "success",
    "values": [
        {
            "column": "column-value",
            ...
        },
        ...
    ],
    "numrows": number-of-rows
}
For example:
{
    "type": "extension",
    "scope": {
        "scoped_exten": "400_test"
    },
    "columns": [
        "virt_exten",
        "company",
        "scoped_exten",
        "owner"
    ]
}
{
    "result": "success",
    "values": [
        {
            "virt_exten": "400",
            "company": "test",
            "scoped_exten": "400_test",
            "owner": 781
        }
    ],
    "numrows": 1
}