Add an Outbound Route

Add and configure an outbound route.

Endpoint

POST /api/v1.1.0/outroute/add?token={token}

Request Parameters

Name Importance Type Description
name Required String Outbound route name.
prefix Required String Dial pattern of the outbound route.
strip Optional String How many digits will be stripped from the front of the dialed number before the call is placed.
prepend Optional String The prepend will be added to the beginning of a dialed number.
trunks Required String Trunk name. Separate multiple trunks with ,.

Example: "trunks":"trunk1,trunk2"

extensions Required String Which extensions are allowed to make outbound calls through this route.

Separate multiple extensions with ,.

Example: "extensions":"1001,1002"

extensionsgroup Optional String Which extension groups are allowed to make outbound calls through this route.

Separate multiple extension groups with ,.

Example: "extensionsgroup":"sales,support"

Examples

Request Example

POST /api/v1.1.0/outroute/add?token=277ac400357b509b4a587ff2157f7ad5 HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150

{
    "name": "outroute1",
    "prefix": "0",
    "strip": "1",
    "prepend": "",
    "trunks": "siptrunk",
    "extensions": "1001",
    "extensionsgroup": "sales,support"
}

Response Example

HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
    "status": "Success"
}