CallRouting
Call Routing#
API Index#
- Get the Routing Cluster document for your own Cluster
- Create the Routing Cluster document for your own Cluster
- Update the Routing Cluster document for your own Cluster
- Patch the Routing Cluster document for your own Cluster
- Delete the Routing Cluster document for your own Cluster
APIs#
Get the Routing Cluster document for your own Cluster#
Required Authentication Level: master
GET http://{SERVER}:{PORT}/v2/routing/customer_cluster
curl -v -X GET \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "X-Kazoo-Cluster-ID: {CLUSTER_ID}" \
http://{SERVER}:{PORT}/v2/routing/customer_cluster
{
"auth_token": "{AUTH_TOKEN}",
"data": {
"id": "aa2b36ac6a5edb290159cd1298283322",
"owner": "2600hz",
"name": "Kazoo Sandbox",
"ips": {
"inbound": {
"east": [
"0.0.0.1"
],
"central": [
"0.0.1.1"
],
"west": [
"0.0.2.1"
]
},
"outbound": {
"east": [
"0.0.0.2"
],
"central": [
"0.0.1.2"
],
"west": [
"0.0.2.2"
]
}
},
"randomize_routing": false
},
"request_id": "{REQUEST_ID}",
"status": "success"
}
Create the Routing Cluster document for your own Cluster#
Required Authentication Level: master
PUT http://{SERVER}:{PORT}/v2/routing/customer_cluster
curl -v -X PUT \
-H "Content-Type:application/json" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "X-Kazoo-Cluster-ID: {CLUSTER_ID}" \
http://{SERVER}:{PORT}/v2/routing/customer_cluster \
-d '{ "data": { \
"owner": "2600hz", \
"name": "Kazoo Sandbox", \
"ips": { \
"inbound": { \
"east": [ \
"0.0.0.1" \
], \
"central": [ \
"0.0.1.1" \
], \
"west": [ \
"0.0.2.1" \
] \
}, \
"outbound": { \
"east": [ \ \
], \
"central": [ \
"0.0.1.2" \
], \
"west": [ \
"0.0.2.2" \
] \
} \
}, \
"randomize_routing": false \
}}'
{
"auth_token": "{AUTH_TOKEN}",
"data": {
"id": "aa2b36ac6a5edb290159cd1298283322",
"owner": "2600hz",
"name": "Kazoo Sandbox",
"ips": {
"inbound": {
"east": [
"0.0.0.1"
],
"central": [
"0.0.1.1"
],
"west": [
"0.0.2.1"
]
},
"outbound": {
"east": [
"0.0.0.2"
],
"central": [
"0.0.1.2"
],
"west": [
"0.0.2.2"
]
}
},
"randomize_routing": false
},
"request_id": "{REQUEST_ID}",
"status": "success"
}
Update the Routing Cluster document for your own Cluster#
Required Authentication Level: master
POST http://{SERVER}:{PORT}/v2/routing/customer_cluster
curl -v -X POST \
-H "Content-Type:application/json" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "X-Kazoo-Cluster-ID: {CLUSTER_ID}" \
http://{SERVER}:{PORT}/v2/routing/customer_cluster \
-d '{ "data": { \
"owner": "2600hz", \
"name": "Kazoo Sandbox", \
"ips": { \
"inbound": { \
"east": [ \
"0.0.0.1" \
], \
"central": [ \
"0.0.1.1" \
], \
"west": [ \
"0.0.2.1" \
] \
}, \
"outbound": { \
"east": [ \
"0.0.0.2", \
"0.0.0.3" \
], \
"central": [ \
"0.0.1.2", \
"0.0.1.3" \
], \
"west": [ \
"0.0.2.2", \
"0.0.2.3" \
] \
} \
}, \
"randomize_routing": false \
}}'
{
"auth_token": "{AUTH_TOKEN}",
"data": {
"id": "aa2b36ac6a5edb290159cd1298283322",
"owner": "2600hz",
"name": "Kazoo Sandbox",
"ips": {
"inbound": {
"east": [
"0.0.0.1"
],
"central": [
"0.0.1.1"
],
"west": [
"0.0.2.1"
]
},
"outbound": {
"east": [
"0.0.0.2",
"0.0.0.3"
],
"central": [
"0.0.1.2",
"0.0.1.3"
],
"west": [
"0.0.2.2",
"0.0.2.3"
]
}
},
"randomize_routing": false
},
"request_id": "{REQUEST_ID}",
"status": "success"
}
Patch the Routing Cluster document for your own Cluster#
Required Authentication Level: master
PATCH http://{SERVER}:{PORT}/v2/routing/customer_cluster/
curl -v -X PATCH \
-H "Content-Type:application/json" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "X-Kazoo-Cluster-ID: {CLUSTER_ID}" \
http://{SERVER}:{PORT}/v2/routing/customer_cluster/ \
-d '{ "data": { \
"ips": { \
"outbound": { \
"east": [ \
"1.1.1.2", \
"1.1.1.3" \
]
} \
}, \
"randomize_routing": true \
}}'
{
"auth_token": "{AUTH_TOKEN}",
"data": {
"id": "aa2b36ac6a5edb290159cd1298283322",
"owner": "2600hz",
"name": "Kazoo Sandbox",
"ips": {
"inbound": {
"east": [
"0.0.0.1"
],
"central": [
"0.0.1.1"
],
"west": [
"0.0.2.1"
]
},
"outbound": {
"east": [
"1.1.1.2",
"1.1.1.3"
],
"central": [
"0.0.1.2",
"0.0.1.3"
],
"west": [
"0.0.2.2",
"0.0.2.3"
]
}
},
"randomize_routing": true
},
"request_id": "{REQUEST_ID}",
"status": "success"
}
Delete the Routing Cluster document for your own Cluster#
Required Authentication Level: master
DELETE http://{SERVER}:{PORT}/v2/routing/customer_cluster/
curl -v -X DELETE \
-H "Content-Type:application/json" \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-H "X-Kazoo-Cluster-ID: {CLUSTER_ID}" \
http://{SERVER}:{PORT}/v2/routing/customer_cluster/
{
"auth_token": "{AUTH_TOKEN}",
"data": {
"id": "aa2b36ac6a5edb290159cd1298283322",
"owner": "2600hz",
"name": "Kazoo Sandbox",
"ips": {
"inbound": {
"east": [
"0.0.0.1"
],
"central": [
"0.0.1.1"
],
"west": [
"0.0.2.1"
]
},
"outbound": {
"east": [
"1.1.1.2",
"1.1.1.3"
],
"central": [
"0.0.1.2",
"0.0.1.3"
],
"west": [
"0.0.2.2",
"0.0.2.3"
]
}
},
"randomize_routing": true
},
"request_id": "{REQUEST_ID}",
"status": "success"
}