List Voice Routes
curl --request GET \
--url https://api.telegent.com/v1.0/account/voice/routesimport requests
url = "https://api.telegent.com/v1.0/account/voice/routes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.telegent.com/v1.0/account/voice/routes', 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.telegent.com/v1.0/account/voice/routes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.telegent.com/v1.0/account/voice/routes"
req, _ := http.NewRequest("GET", url, nil)
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.telegent.com/v1.0/account/voice/routes")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/account/voice/routes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"AccountID": "AID-ab12345-2725-45a1-bd5e-526ed19799xx",
"TotalRoutes": 2,
"Results": [
{
"CallRouteStatus": "Active",
"CallRouteId": "CRID-993804Ar09099",
"AccountID": "AID-ab12345-2725-45a1-bd5e-526ed19799xx",
"RouteName": "Main SIP Trunk",
"RouteType": "Trunk",
"VoiceUrlMethod": "POST",
"TrunkIp1": "20.87.87.87",
"TrunkIp2": "20.87.87.86",
"TrunkPort1": "5061",
"TrunkPort2": "5060",
"TrunkTransport1": "UDP",
"TrunkTransport2": "TCP",
"TrunkUri1": "https://pstn.joonto.com",
"TrunkUri2": "https://pstn2.joonto.com",
"TrunkEnabled1": true,
"TrunkEnabled2": false,
"Trunk1Priortiy": 10,
"Trunk1Weight": 10,
"Trunk2Priortiy": 20,
"Trunk2Weight": 20,
"HeaderManipulation": "HMI8802029",
"EnableSipRefer": true,
"TransferCallerId": "Transferee/Transferor",
"SymmetricRtp": true,
"EnableTrpSecureTrunk": true,
"EnablePstnTransfer": true,
"IpWhitelist": [
{
"IpAddress": "20.20.10.10"
},
{
"IpAddress": "20.20.10.20"
}
],
"CnamLookup": true,
"TerminationUriSubdomain": "client",
"EnableCallStreaming": true,
"WssUri": "wss://192.67.88.2",
"RouteEnabled": true
},
{
"CallRouteStatus": "Active",
"CallRouteId": "CRID-993804Ar09093",
"AccountID": "AID-ab12345-2725-45a1-bd5e-526ed19799xx",
"RouteName": "Main SIP Trunk Secondary",
"RouteType": "Trunk",
"VoiceUrlMethod": "POST",
"TrunkIp1": "20.87.87.87",
"TrunkIp2": "20.87.87.86",
"TrunkPort1": "5061",
"TrunkPort2": "5060",
"TrunkTransport1": "UDP",
"TrunkTransport2": "TCP",
"TrunkUri1": "https://pstn.joonto.com",
"TrunkUri2": "https://pstn2.joonto.com",
"TrunkEnabled1": true,
"TrunkEnabled2": false,
"Trunk1Priortiy": 10,
"Trunk1Weight": 10,
"Trunk2Priortiy": 20,
"Trunk2Weight": 20,
"HeaderManipulation": "HMI8802029",
"EnableSipRefer": true,
"TransferCallerId": "Transferee/Transferor",
"SymmetricRtp": true,
"EnableTrpSecureTrunk": true,
"EnablePstnTransfer": true,
"IpWhitelist": [
{
"IpAddress": "20.20.10.10"
},
{
"IpAddress": "20.20.10.20"
}
],
"CnamLookup": true,
"TerminationUriSubdomain": "client",
"EnableCallStreaming": true,
"WssUri": "wss://192.67.88.2",
"RouteEnabled": true
}
]
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}Accounts
List Voice Routes
Retrieve a list of all voice routes configured in your account. Returns basic information about each route including CRID, name, and routing configuration.
What this does: Returns a list of voice routes (CRID- IDs) configured on the account. Use this to find an existing route ID before provisioning a number with voice enabled or updating call routing.
Next steps:
- Get full route details —
GET /v1.0/voice/routes - Create a new route —
POST /v1.0/voice/routes
GET
/
v1.0
/
account
/
voice
/
routes
List Voice Routes
curl --request GET \
--url https://api.telegent.com/v1.0/account/voice/routesimport requests
url = "https://api.telegent.com/v1.0/account/voice/routes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.telegent.com/v1.0/account/voice/routes', 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.telegent.com/v1.0/account/voice/routes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.telegent.com/v1.0/account/voice/routes"
req, _ := http.NewRequest("GET", url, nil)
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.telegent.com/v1.0/account/voice/routes")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/account/voice/routes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"AccountID": "AID-ab12345-2725-45a1-bd5e-526ed19799xx",
"TotalRoutes": 2,
"Results": [
{
"CallRouteStatus": "Active",
"CallRouteId": "CRID-993804Ar09099",
"AccountID": "AID-ab12345-2725-45a1-bd5e-526ed19799xx",
"RouteName": "Main SIP Trunk",
"RouteType": "Trunk",
"VoiceUrlMethod": "POST",
"TrunkIp1": "20.87.87.87",
"TrunkIp2": "20.87.87.86",
"TrunkPort1": "5061",
"TrunkPort2": "5060",
"TrunkTransport1": "UDP",
"TrunkTransport2": "TCP",
"TrunkUri1": "https://pstn.joonto.com",
"TrunkUri2": "https://pstn2.joonto.com",
"TrunkEnabled1": true,
"TrunkEnabled2": false,
"Trunk1Priortiy": 10,
"Trunk1Weight": 10,
"Trunk2Priortiy": 20,
"Trunk2Weight": 20,
"HeaderManipulation": "HMI8802029",
"EnableSipRefer": true,
"TransferCallerId": "Transferee/Transferor",
"SymmetricRtp": true,
"EnableTrpSecureTrunk": true,
"EnablePstnTransfer": true,
"IpWhitelist": [
{
"IpAddress": "20.20.10.10"
},
{
"IpAddress": "20.20.10.20"
}
],
"CnamLookup": true,
"TerminationUriSubdomain": "client",
"EnableCallStreaming": true,
"WssUri": "wss://192.67.88.2",
"RouteEnabled": true
},
{
"CallRouteStatus": "Active",
"CallRouteId": "CRID-993804Ar09093",
"AccountID": "AID-ab12345-2725-45a1-bd5e-526ed19799xx",
"RouteName": "Main SIP Trunk Secondary",
"RouteType": "Trunk",
"VoiceUrlMethod": "POST",
"TrunkIp1": "20.87.87.87",
"TrunkIp2": "20.87.87.86",
"TrunkPort1": "5061",
"TrunkPort2": "5060",
"TrunkTransport1": "UDP",
"TrunkTransport2": "TCP",
"TrunkUri1": "https://pstn.joonto.com",
"TrunkUri2": "https://pstn2.joonto.com",
"TrunkEnabled1": true,
"TrunkEnabled2": false,
"Trunk1Priortiy": 10,
"Trunk1Weight": 10,
"Trunk2Priortiy": 20,
"Trunk2Weight": 20,
"HeaderManipulation": "HMI8802029",
"EnableSipRefer": true,
"TransferCallerId": "Transferee/Transferor",
"SymmetricRtp": true,
"EnableTrpSecureTrunk": true,
"EnablePstnTransfer": true,
"IpWhitelist": [
{
"IpAddress": "20.20.10.10"
},
{
"IpAddress": "20.20.10.20"
}
],
"CnamLookup": true,
"TerminationUriSubdomain": "client",
"EnableCallStreaming": true,
"WssUri": "wss://192.67.88.2",
"RouteEnabled": true
}
]
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}Query Parameters
string AccountId
Response
Success — returns a list of all voice routes on the account
The response is of type object.
⌘I