The Call Feedback subresource provides a simple API to report the quality experienced during a phone call. On one hand, if the call was perfect your users can rate it with a Quality Score of 5. On the other hand, if the user experienced an issue, they can rate it with a lower Quality Score and specify the issue experienced, such as diminished audio quality, call dropped or incorrect caller id.
This makes it easy to build to feedback interfaces integrated into your application when the call is over like the example below:
Feedback is a subresource of a Call instance resource. It represents a call quality feedback entry for a given phone call.
A Call Feedback instance resource is represented by the following properties:
The following are the possible values for the
|imperfect-audio||Imperfect audio quality: Choppy, echoed, or garbled audio during conversation.|
|dropped-call||Dropped call: call initially connected but was dropped.|
|incorrect-caller-id||Incorrect caller ID: Call connected but caller ID displayed ‘Unknown’ or an incorrect number.|
|post-dial-delay||Post dial delay: Call connected but there was a long delay between dialing the phone number and the start of ringing.|
|digits-not-captured||DTMF tones not captured: Failed to capture digit input on phone menus.|
|unsolicited-call||Unsolicited call: Received telemarketer, wrong number, automated or other type of unsolicited call.|
|audio-latency||Audio latency: Call participants can hear each other but with significant audio delay.|
|one-way-audio||One way audio: Only one party could hear the audio during the conversation.|
The POST request creates or updates a feedback entry for a Call. Every feedback entry needs a quality score and can optionally have one or multiple issues. if successful, it returns the resource representation identical to that returned above when making a GET Request.
You may include the following parameters in your POST request:
One or more issues experienced during the call. The issues can be:
Create a new Feedback entry for a given call.
With Feedback Summaries you can get a pulse of your end user’s perception of quality and the most common issues encountered in the context of all your voice traffic for a range of dates.
You must POST at least the following to create a new Feedback Summary:
|StartDate||Only include usage that has occurred on or after this date. Format is YYYY-MM-DD. All dates are in UTC.|
|EndDate||Only include usage that has occurred on or before this date. Format is YYYY-MM-DD. All dates are in UTC.|
|IncludeSubaccounts||true to include feedback entries for the master account and all subaccounts. false to include feedback entries for the specified account. IncludeSubaccounts is false by default.|
You may also set a StatusCallback URL to get a webhook when the Feedback Summary is completed.
|StatusCallback||The URL that Twilio will request when the Feedback Summary is completed.|
|StatusCallbackMethod||The HTTP method Twilio will use to make requests to the StatusCallback URL. Either GET or POST.|
After the Feedback Summary is completed, Twilio will make an asynchronous HTTP request to the StatusCallback URL if you provided one in your POST.
The parameters Twilio passes to your application in its asynchronous request to the StatusCallback URL include the parameters specified below:
|AccountSid||Your Twilio account id. It is 34 characters long, and always starts with the letters AC.|
|FeedbackSummarySid||The unique id of the Feedback Summary.|
|Status||The status of the Feedback Summary; queued, in-progress, completed, or failed.|
|ResourceUri||The Feedback Summary Resource URI.|
For example, you might request a Feedback Summary for the month of January 2014 for the master account and all subaccounts. In this case, the query string should be
This would request a Feedback Summary for all feedback entries for calls made during January. See the example below:
|StartDate||The first date for which feedback entries are included in this Feedback Summary, formatted as YYYY-MM-DD. All dates are in UTC.|
|EndDate||The last date for which feedback entries are included in this Feedback Summary, formatted as YYYY-MM-DD. All dates are in UTC.|
|AccountSid||The Account that reported the feedback entry.|
|IncludeSubaccounts||true if the feedback summary includes subaccounts, false otherwise.|
|Status||The status of the feedback summary can be queued, in-progress, completed, or failed.|
|CallCount||The total number of calls.|
|CallFeedbackCount||The total number of calls with a feedback entry.|
|QualityScoreAverage||The average QualityScore of the feedback entries.|
|QualityScoreMedian||The median QualityScore of the feedback entries.|
|QualityScoreStandardDeviation||The standard deviation of the quality scores.|
|Issues||A list of all the issues experienced. The list includes the issue name, the number of occurrences and percentage of calls that experienced this issue.|
Return the FeedbackSummary entry when in-progress