Query Outbound Route Settings
Query the basic settings of an outbound route, multiple outbound routes, or all outbound routes.
Endpoint
POST /api/v0.0.1/outroute/query?token={token}&type={type}
Request Parameters
Name | Importance | Type | Description |
name | Required | String | Outbound Route name.
Example: “name”:”route1″
Example: “name”: “route1,route2”
|
Response Parameters
Name | Type | Description |
outroutes | Object | Object parameter. |
id | Int | Outbound route ID. |
name | String | Outbound route name. |
prefix | 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. |
prepend | String | The prepend will be added to the beginning of a dialed number. |
matchpattern | 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. |
callerid | String | Caller ID. |
trunks | String | Trunk name. |
Examples
Request Example
POST /api/v0.0.1/outroute/query?token=813b621cfe8eecf445a2ce1f4a079ffe&type=json HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
“name”:”all”
}
POST /api/v0.0.1/outroute/query?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>
<name>all</name>
</xml>
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
“status”: “Success”,
“outroutes”: [
{
“id”: “19”,
“name”: “to-pbx”,
“prepend”: “”,
“prefix”: “16”,
“matchpattern”: “X.”,
“callerid”: “”,
“trunks”: “to-18-16-2″
}
]
}
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>
<outroutes>
<item id=”0”>
<id>19</id>
<name>to-pbx</name>
<prepend></prepend>
<prefix>16</prefix>
<matchpattern>X.</matchpattern>
<callerid></callerid>
<trunks>to-18-16-2</trunks>
</item>
</outroutes>
</xml>