Edit an Outbound Route
Edit the basic settings of an outbound route.
Endpoint
POST /api/v0.0.1/outroute/update?token={token}&type={type}
Request Parameters
Name | Importance | Type | Description |
id | Required | Int | Outbound route ID. |
name | Required | String | Outbound route name. |
prefix | Optional | String | Dial pattern of the outbound route. The number dialed is compared with this and subsequent columns. After the match, the prefix is removed from the dialed number before the prefix is sent to the trunk. |
matchpattern | Required | String | The dialed number will be compared with the prefix + this matching pattern. Once matched, the matching pattern part of the dialed number will be sent to the relay. |
prepend | Optional | String | The prepend will be added to the beginning of a dialed number. |
callerid | Optional | String | Caller ID. |
trunks | Required | String | Trunk name. Separate multiple trunks with ,.
Example: “trunks”:”trunk1,trunk2″ |
Examples
Request Example
POST /api/v0.0.1/outroute/update?token=813b621cfe8eecf445a2ce1f4a079ffe&type=json HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
“id”:”20″,
“name”:”to20″,
“matchpattern”:”X.”,
“prefix”:”20″,
“trunks”:”to-18-16-2″
}
POST /api/v0.0.1/outroute/update?token=813b621cfe8eecf445a2ce1f4a079ffe&type=xml HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
<?xml version=”1.0″ encoding=”UTF-8″ ?>
<xml>
<id>21</id>
<name>to20</name>
<matchpattern>X.</matchpattern>
<prefix>20</prefix>
<trunks>to-18-16-2</trunks>
</xml>
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
“status”: “Success”
}
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
<?xml version=”1.0″ encoding=”utf-8″?>
<xml>
<status>Success</status>
</xml>