Get routing rule
curl --request GET \
--url https://api.zeroruntime.ai/v2/sip/routing-rule/{ruleId} \
--header 'Authorization: <api-key>'import requests
url = "https://api.zeroruntime.ai/v2/sip/routing-rule/{ruleId}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.zeroruntime.ai/v2/sip/routing-rule/{ruleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zeroruntime.ai/v2/sip/routing-rule/{ruleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zeroruntime.ai/v2/sip/routing-rule/{ruleId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zeroruntime.ai/v2/sip/routing-rule/{ruleId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeroruntime.ai/v2/sip/routing-rule/{ruleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "rr_8k2m1x",
"type": "inbound",
"numbers": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"phoneNumbers": [
"<string>"
],
"apiKey": "<string>",
"agentId": "<string>",
"agentMetadata": {},
"room": {
"type": "dynamic",
"prefix": "blank"
},
"includeHeaders": "NONE",
"headers": {},
"headersToAttributes": {},
"allowedNumbers": [
"<string>"
],
"allowedIpAddresses": [
"<string>"
],
"tags": [
"<string>"
],
"recording": false,
"dtmf": false,
"noiseCancellation": false,
"hidePhoneNumber": false
}Routing rules
Get routing rule
Returns one routing rule.
GET
/
v2
/
sip
/
routing-rule
/
{ruleId}
Get routing rule
curl --request GET \
--url https://api.zeroruntime.ai/v2/sip/routing-rule/{ruleId} \
--header 'Authorization: <api-key>'import requests
url = "https://api.zeroruntime.ai/v2/sip/routing-rule/{ruleId}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.zeroruntime.ai/v2/sip/routing-rule/{ruleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zeroruntime.ai/v2/sip/routing-rule/{ruleId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zeroruntime.ai/v2/sip/routing-rule/{ruleId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zeroruntime.ai/v2/sip/routing-rule/{ruleId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeroruntime.ai/v2/sip/routing-rule/{ruleId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "rr_8k2m1x",
"type": "inbound",
"numbers": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"phoneNumbers": [
"<string>"
],
"apiKey": "<string>",
"agentId": "<string>",
"agentMetadata": {},
"room": {
"type": "dynamic",
"prefix": "blank"
},
"includeHeaders": "NONE",
"headers": {},
"headersToAttributes": {},
"allowedNumbers": [
"<string>"
],
"allowedIpAddresses": [
"<string>"
],
"tags": [
"<string>"
],
"recording": false,
"dtmf": false,
"noiseCancellation": false,
"hidePhoneNumber": false
}Authorizations
Your API token, sent raw (no Bearer prefix).
Path Parameters
Response
The rule.
Example:
"rr_8k2m1x"
Available options:
inbound, outbound E.164 numbers already on your account. Leave it out to attach numbers later.
Optional. On create, leave it out to use the API key of the token you call with.
Agent to dispatch. Omit to dispatch none.
Flat string map handed to the agent.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
ALL, SIP_X_HEADERS, NONE Outbound only. Extra SIP headers to send.
Show child attributes
Show child attributes
Inbound only. Maps an incoming header onto a call attribute.
Show child attributes
Show child attributes
Empty means no restriction.
Empty means no restriction.