Posting Call Quality Feedback Using API
This method allows you to post feedback for calls. Call quality feedback information received through this API is accessible on the Call Debug UI. Aggregated reports are available for analyses on the Call Insights Reporting Dashboard.
API Endpoint
POST
https://stats.plivo.com/v1/Call/{call_uuid}/Feedback/
Arguments
call_uuidRequired | The call uuid of the call for which feedback is being posted |
ratingRequired | Quality rating for the call, allowed values are, float between [1,5]. PS: for integer values both ‘x’ or ‘x.`0’ are accepted. |
issuesRequired only if rating is <5 | List of issues observed on the call. One or more of the following: 'AUDIO_LAG', 'BROKEN_AUDIO', 'CALL_DROPPED', 'CALLERID_ISSUE', 'DIGITS_NOT_CAPTURED', 'ECHO', 'HIGH_CONNECT_TIME', 'LOW_AUDIO_LEVEL', 'ONE_WAY_AUDIO', 'OTHERS', 'ROBOTIC_AUDIO' |
Notes | This is an optional free text field. It can be used to send descriptive feedback for the call. |
HTTP Responses We Send
HTTP Status Code | Message |
201 | Feedback has been Posted |
401 | Authentication Failed |
404 | Resource Cannot be found* |
500 | Server Error |
405 | HTTP method not allowed |
404 | Please check the Call uuid** |
422 | Rating has to be a float between 1 -5 |
422 | Issues have to be an array of one or more than one of the following, 'AUDIO_LAG' ,'BROKEN_AUDIO' ,'CALL_DROPPPED' ,'CALLERID_ISSUES' ,'DIGITS_NOT_CAPTURED' ,'ECHO' ,'HIGH_CONNECT_TIME', 'LOW_AUDIO_LEVEL', 'ONE_WAY_AUDIO', 'OTHERS','ROBOTIC_AUDIO' |
* Generic response indicating error in resource used in the Post API call
** Specific response indicating the error in call uuid used in Post API call
Response Attributes
HTTP Status Code | The HTTP status code from the above |
api_id | Identifies the request |
error | Indicates there is an error and provides information regarding the error |
message | Provides information regarding request |
Response
HTTP Status Code: 201
{
"message": "Feedback has been Posted",
"api_id": "97ceeb52-58b6-11e1-86da-77300b68f8bb",
"status": "success"
}
Example Request
1
2
3
4
5
6
7
8
9
10
11
12
#
# Example for Call Feedback creation
#
import plivo
client = plivo.RestClient()
response = client.call_feedback.create(
call_uuid="b38149eb-b8fe-45d5-85b2-78ee4424788f",
rating="4",
issues=["AUDIO_LAG"],
notes="Call quality was good")
print(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#
# Example for Call Feedback creation
#
require 'rubygems'
require 'plivo'
include Plivo
include Plivo::Exceptions
api = RestClient.new("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN")
begin
response = api.call_feedback.create('f28149eb-b8fe-45d5-85b2-78ee4424788f',
4,
["AUDIO_LAG"],
"Call quality was good")
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Example for Call Feedback creation
var plivo = require('plivo');
(function main() {
'use strict';
var client = new plivo.Client();
client.callFeedback.create('f18149eb-b8fe-45d5-85b2-78ee4424788f',
4,
issues = ["AUDIO_LAG"],
notes = "Call quality was good").then(function (response) {
console.log(response);
}, function (err) {
console.error(err);
});
})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
/**
* Example for Call Feedback creation
*/
require 'vendor/autoload.php';
use Plivo\RestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new RestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
try {
$response = $client->callFeedback->create('f18149eb-b8fe-45d5-85b2-78ee4424788f',
4,
["AUDIO_LAG"],
"Call quality was good");
print_r($response);
}
catch (PlivoRestException $ex) {
print_r($ex);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import com.plivo.api.Plivo;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.callfeedback.CallFeedback;
import com.plivo.api.models.callfeedback.CallFeedbackCreateResponse;
import java.io.IOException;
import java.util.Collections;
/**
* Example for Call Feedback creation
*/
class CallFeedbackCreate {
public static void main(String[] args) {
Plivo.init();
try {
CallFeedbackCreateResponse response = CallFeedback
.creator("f18149eb-b8fe-45d5-85b2-78ee4424788f", (float) 4)
.issues(Collections.singletonList("AUDIO_LAG")).notes("Call quality was good").create();
System.out.println(response);
} catch (PlivoRestException | IOException e) {
e.printStackTrace();
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
* Example for Call Feedback Creation
*/
using System;
using System.Collections.Generic;
using Plivo;
using Plivo.Exception;
namespace PlivoExamples
{
internal class Program
{
public static void Main(string[] args)
{
var api = new PlivoApi("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
try
{
var response = api.CallFeedback.Create(
callUUID: "a18149eb-b8fe-45d5-85b2-78ee4424788f",
rating: 4,
issues: new List<string> { "AUDIO_LAG" },
notes: "Call quality was good");
Console.WriteLine(response);
}
catch (PlivoRestException e)
{
Console.WriteLine("Exception: " + e.Message);
}
}
}
}
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{"issues": ["AUDIO_LAG"], "rating": "4", "notes": "Call quality was good"}' \
https://stats.plivo.com/v1/Call/f6bf3c48-afdf-4e42-a30e-9e00fda351d/Feedback/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Example for Call Feedback creation
package main
import "fmt"
import "github.com/plivo/plivo-go"
func main() {
client, err := plivo.NewClient("", "", &plivo.ClientOptions{})
if err != nil {
panic(err)
}
issuesArr := []string{**"AUDIO_LAG"**}
response, err := client.CallFeedback.Create(
plivo.CallFeedbackParams{
CallUUID: "f18149eb-b8fe-45d5-85b2-78ee442478",
Rating: "4",
Issues: issuesArr,
Notes: "Call quality was good"})
if err != nil {
panic(err)
}
fmt.Printf("Response: %#v\n", response)
}
Rate this page
🥳 Thank you! It means a lot to us!
×
Help Us Improve
Thank you so much for rating the page, we would like to get your input for further improvements!
Subscribe to Updates
Thank you for your feedback!