Call Details (Beta)
Retrieve enhanced call detail records with richer metadata including leg-level information, recording details, DTMF digits, and flow information.
Endpoint​
GET /v3/accounts/<account_sid>/calls/<call_sid>
Regional URLs​
| Region | URL |
|---|---|
| Singapore | https://<api_key>:<api_token>@ccm-api.exotel.com/v3/accounts/<account_sid>/calls/<call_sid> |
| Mumbai | https://<api_key>:<api_token>@ccm-api.in.exotel.com/v3/accounts/<account_sid>/calls/<call_sid> |
Path Parameters​
| Parameter | Type | Description |
|---|---|---|
account_sid | String | Your Exotel account SID |
call_sid | String | Unique call identifier (from Make Call API response) |
Code Examples​
- cURL
- Python
- Node.js
- PHP
- Go
curl -X GET \
'https://<api_key>:<api_token>@ccm-api.exotel.com/v3/accounts/<account_sid>/calls/<call_sid>' \
-H 'Content-Type: application/json'
import requests
url = f"https://ccm-api.exotel.com/v3/accounts/{account_sid}/calls/{call_sid}"
headers = {"Content-Type": "application/json"}
response = requests.get(
url,
auth=(api_key, api_token),
headers=headers
)
print(response.json())
const apiKey = '<your_api_key>';
const apiToken = '<your_api_token>';
const accountSid = '<your_account_sid>';
const callSid = '<call_sid>';
const url = `https://ccm-api.exotel.com/v3/accounts/${accountSid}/calls/${callSid}`;
const response = await fetch(url, {
headers: {
'Authorization': 'Basic ' + Buffer.from(`${apiKey}:${apiToken}`).toString('base64'),
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://<api_key>:<api_token>@ccm-api.exotel.com/v3/accounts/<account_sid>/calls/<call_sid>",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array("Content-Type: application/json"),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://<api_key>:<api_token>@ccm-api.exotel.com/v3/accounts/<account_sid>/calls/<call_sid>"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
Response — Active Call​
{
"request_id": "62bd4015e8c04ecea3a5fbd7272f95ae",
"method": "GET",
"http_code": 200,
"response": {
"code": 200,
"status": "success",
"call_details": {
"sid": "cabfb1dfa8c5e1c7f2c458423b7716b3",
"direction": "outbound",
"virtual_number": "+911414941199",
"state": "active",
"status": null,
"created_time": "2022-11-03 22:54:40+05:30",
"updated_time": "2022-11-03 22:54:58+05:30",
"start_time": "2022-11-03 22:54:57+05:30",
"end_time": "1970-01-01 05:30:00+05:30"
}
}
}
Response — Completed Call​
{
"request_id": "9107ba6bdfc5493e806b7ea82706f2e0",
"method": "GET",
"http_code": 200,
"response": {
"code": 200,
"status": "success",
"call_details": {
"sid": "cabfb1dfa8c5e1c7f2c458423b7716b3",
"direction": "outbound",
"virtual_number": "+911414941199",
"state": "terminal",
"status": "completed",
"legs": "/v3/accounts/<account_sid>/calls/cabfb1dfa8c5e1c7f2c458423b7716b3/legs",
"created_time": "2022-11-03 22:54:40+05:30",
"updated_time": "2022-11-03 22:56:04+05:30",
"start_time": "2022-11-03 22:54:57+05:30",
"end_time": "2022-11-03 22:56:04+05:30",
"total_duration": 84,
"total_talk_time": 59,
"custom_field": null,
"app_id": null,
"app_name": null,
"digits": null,
"recordings": [
{
"url": "https://s3-ap-south-1.amazonaws.com/exotel-mum1-recordings/Exotel/cabfb1dfa8c5e1c7f2c458423b7716b3.mp3"
}
]
}
}
}
Response Fields​
| Field | Type | Description |
|---|---|---|
request_id | String | Unique request identifier for debugging |
method | String | HTTP method used (GET) |
http_code | Integer | HTTP status code |
response.code | Integer | Response code |
response.status | String | success or failure |
response.call_details.sid | String | Unique call identifier |
response.call_details.direction | String | inbound, outbound-dial, or outbound-api |
response.call_details.virtual_number | String | ExoPhone/virtual number used |
response.call_details.state | String | active or terminal |
response.call_details.status | String | Call status (see below) |
response.call_details.legs | String | URL to fetch leg-level details |
response.call_details.created_time | DateTime | Request initiation time (YYYY-MM-DD HH:mm:ss+hh:mm) |
response.call_details.updated_time | DateTime | Last status update time |
response.call_details.start_time | DateTime | Call start time |
response.call_details.end_time | DateTime | Call completion time |
response.call_details.total_duration | Integer | Total duration in seconds |
response.call_details.total_talk_time | Integer | Conversation duration in seconds |
response.call_details.custom_field | String | Custom data passed during the call request |
response.call_details.app_id | String | Flow ID used (null if no flow) |
response.call_details.app_name | String | Flow name used (null if no flow) |
response.call_details.digits | String | DTMF digits pressed (hyphen-separated, null if none) |
response.call_details.recordings | Array | Array of recording objects with url field |
Call States & Statuses​
States​
| State | Description |
|---|---|
active | Call is ongoing or post-call processing pending |
terminal | Call completed and all data processed |
Statuses​
| Status | Description |
|---|---|
completed | Call connected and ended normally |
from_leg_unanswered | From-leg (agent) did not answer |
to_leg_unanswered | To-leg (customer) did not answer |
from_leg_cancelled | From-leg canceled the call |
to_leg_no_dial | Could not dial the to-leg |
from_leg_no_dial | Could not dial the from-leg |
HTTP Status Codes​
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request — Invalid parameters |
401 | Unauthorized — Invalid credentials |
404 | Not Found — Call SID doesn't exist |
429 | Rate Limited — Too many requests |
500 | Server Error |
note
- When the call is in
activestate, fields liketotal_duration,total_talk_time,recordings, andstatusmay be null or incomplete. - The
total_talk_timeaccumulates across multiple leg transfers. - Recording URLs are temporary pre-signed URLs.