Read stored call audio-quality measurements
curl --request GET \
--url https://api.pyai.com/v1/telephony/calls/{id}/quality \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pyai.com/v1/telephony/calls/{id}/quality"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pyai.com/v1/telephony/calls/{id}/quality', 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.pyai.com/v1/telephony/calls/{id}/quality",
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: Bearer <token>"
],
]);
$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.pyai.com/v1/telephony/calls/{id}/quality"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.pyai.com/v1/telephony/calls/{id}/quality")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/telephony/calls/{id}/quality")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"call_id": "<string>",
"status": "available",
"reason": "<string>",
"source": "managed_transport",
"scope": "caller_to_platform",
"observation": "terminal_snapshot",
"observed_at": "2023-11-07T05:31:56Z",
"live": false,
"metrics": {
"packets_received": 1,
"packets_lost": 1,
"packets_reordered": 1,
"duplicate_packets": 1,
"packets_sent": 1,
"playout_frames": 1,
"concealed_frames": 1,
"late_frames": 1,
"playout_duplicates": 1,
"jitter_ms": 1,
"packet_loss_percent": 50,
"concealment_percent": 50,
"mos": null,
"rtt_ms": null
},
"unavailable_metrics": [
"<string>"
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "invalid_request_error",
"param": "<string>"
}
}{
"title": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}Telephony
Read stored call audio-quality measurements
Read an incoming-audio measurement snapshot for a call owned by your project. This is not a live network probe or a measurement of the recipient’s speaker. Missing, unverified or unreconciled measurements are explicitly unavailable. Opinion scores and round-trip time are not estimated. This read never dials a phone or changes the call.
GET
/
v1
/
telephony
/
calls
/
{id}
/
quality
Read stored call audio-quality measurements
curl --request GET \
--url https://api.pyai.com/v1/telephony/calls/{id}/quality \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pyai.com/v1/telephony/calls/{id}/quality"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pyai.com/v1/telephony/calls/{id}/quality', 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.pyai.com/v1/telephony/calls/{id}/quality",
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: Bearer <token>"
],
]);
$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.pyai.com/v1/telephony/calls/{id}/quality"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.pyai.com/v1/telephony/calls/{id}/quality")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/telephony/calls/{id}/quality")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"call_id": "<string>",
"status": "available",
"reason": "<string>",
"source": "managed_transport",
"scope": "caller_to_platform",
"observation": "terminal_snapshot",
"observed_at": "2023-11-07T05:31:56Z",
"live": false,
"metrics": {
"packets_received": 1,
"packets_lost": 1,
"packets_reordered": 1,
"duplicate_packets": 1,
"packets_sent": 1,
"playout_frames": 1,
"concealed_frames": 1,
"late_frames": 1,
"playout_duplicates": 1,
"jitter_ms": 1,
"packet_loss_percent": 50,
"concealment_percent": 50,
"mos": null,
"rtt_ms": null
},
"unavailable_metrics": [
"<string>"
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "invalid_request_error",
"param": "<string>"
}
}{
"title": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}Authorizations
apiKeyxApiKey
Response
Stored measurement or an explicit unavailable result.