# Call Summary Resource

A **Call Summary** provides an overview of

* metadata, and
* quality metrics

for a single call.

Using the **Call Summary Resource**, you can [get a single summary for a specific Call](#fetch-a-summary-resource).

To get a list of Call Summaries for multiple calls use the **[Call Summaries Resource](/docs/voice/voice-insights/api/call/call-summaries-resource)**.

> \[!WARNING]
>
> [Voice Insights Advanced Features](/docs/voice/voice-insights/advanced-features) must be active to use this API Resource.

> \[!NOTE]
>
> A completed Call Summary may take up to a half hour to generate, but a partial summary record will be available within ten minutes of a call ending.

## Call Summary properties

The following table contains the top-level properties of a single Call Summary instance.

A Call Summary is a complex data structure with several of the top-level properties constituting nested objects.

The top level contains `attributes` and `properties` objects, and each edge of a call has metrics for both directions of the media stream as well as properties and summarized metrics. Further information for these object-typed properties can be found on the **[Details: Call Summary](/docs/voice/voice-insights/api/call/details-call-summary)** page.

Whether a particular edge is present will depend on the call type. A Voice SDK call will have an `sdk_edge` and a `client_edge`. A SIP trunking call will have a `sip_edge` and a `carrier_edge`. A SIP domain or `<Dial><Sip>` call will have only a `sip_edge`. A PSTN call will have only a `carrier_edge`**.** See **[Understanding Twilio Media Edges](/docs/voice/voice-insights/api/call/understanding-edges)** for a conceptual explanation.

```json
{"type":"object","refName":"insights.v1.call.summary","modelName":"insights_v1_call_summary","properties":{"account_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$","nullable":true,"description":"The unique SID identifier of the Account."},"call_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^CA[0-9a-fA-F]{32}$","nullable":true,"description":"The unique SID identifier of the Call."},"call_type":{"type":"string","nullable":true,"description":"The Call Type of the summarized Call. One of `carrier`, `sip`, `trunking`, `client` and `whatsapp`.","enum":["carrier","sip","trunking","client","whatsapp"],"refName":"summary_enum_call_type","modelName":"summary_enum_call_type"},"call_state":{"type":"string","nullable":true,"description":"The Call State of the summarized Call. One of `ringing`, `completed`, `busy`, `fail`, `noanswer`, `canceled`, `answered`, `undialed`.","enum":["ringing","completed","busy","fail","noanswer","canceled","answered","undialed"],"refName":"summary_enum_call_state","modelName":"summary_enum_call_state"},"answered_by":{"type":"string","nullable":true,"description":"The Answered By value for the summarized call based on `Answering Machine Detection (AMD)`. One of `unknown`, `machine_start`, `machine_end_beep`, `machine_end_silence`, `machine_end_other`, `human` or `fax`. Refer to [AMD](/docs/voice/answering-machine-detection) for more detail.","enum":["unknown","machine_start","machine_end_beep","machine_end_silence","machine_end_other","human","fax"],"refName":"summary_enum_answered_by","modelName":"summary_enum_answered_by"},"processing_state":{"type":"string","nullable":true,"description":"The Processing State of the Call Summary. The Processing State will be `partial` until the assembly of the Call Summary finishes, which occurs approximately 30 minutes after Call end. Then the Processing State changes to `complete`","enum":["complete","partial"],"refName":"summary_enum_processing_state","modelName":"summary_enum_processing_state"},"created_time":{"type":"string","format":"date-time","nullable":true,"description":"The time at which the Call was created, given in ISO 8601 format. Can be different from `start_time` in the event of queueing due to CPS"},"start_time":{"type":"string","format":"date-time","nullable":true,"description":"The time at which the Call was started, given in ISO 8601 format."},"end_time":{"type":"string","format":"date-time","nullable":true,"description":"The time at which the Call was ended, given in ISO 8601 format."},"duration":{"type":"integer","nullable":true,"description":"Duration between when the call was initiated and the call was ended"},"connect_duration":{"type":"integer","nullable":true,"description":"Duration between when the call was answered and when it ended"},"from":{"nullable":true,"description":"The calling party.","x-twilio":{"pii":{"handling":"standard","deleteSla":30}}},"to":{"nullable":true,"description":"The called party.","x-twilio":{"pii":{"handling":"standard","deleteSla":30}}},"carrier_edge":{"nullable":true,"description":"Contains metrics and properties for the Twilio media gateway of a PSTN call."},"client_edge":{"nullable":true,"description":"Contains metrics and properties for the Twilio media gateway of a Client call."},"sdk_edge":{"nullable":true,"description":"Contains metrics and properties for the SDK sensor library for Client calls."},"sip_edge":{"nullable":true,"description":"Contains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call."},"tags":{"type":"array","nullable":true,"description":"Tags applied to calls by Voice Insights analysis indicating a condition that could result in subjective degradation of the call quality.","items":{"type":"string"}},"url":{"type":"string","format":"uri","nullable":true,"description":"The URL of this resource."},"attributes":{"nullable":true,"description":"Attributes capturing call-flow-specific details."},"properties":{"nullable":true,"description":"Contains edge-agnostic call-level details."},"trust":{"nullable":true,"description":"Contains trusted communications details including Branded Call and verified caller ID."},"annotation":{"nullable":true,"description":"Programmatically labeled annotations for the Call. Developers can update the Call Summary records with Annotation during or after a Call. Annotations can be updated as long as the Call Summary record is addressable via the API."}}}
```

## Fetch a Summary resource

`GET https://insights.twilio.com/v1/Voice/{CallSid}/Summary`

### Path parameters

```json
[{"name":"CallSid","in":"path","description":"The unique SID identifier of the Call.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^CA[0-9a-fA-F]{32}$"},"required":true}]
```

### Query parameters

```json
[{"name":"ProcessingState","in":"query","description":"The Processing State of this Call Summary. One of `complete`, `partial` or `all`.","schema":{"type":"string","enum":["complete","partial"],"refName":"summary_enum_processing_state","modelName":"summary_enum_processing_state"}}]
```

Fetch a Call Summary

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchSummary() {
  const summary = await client.insights.v1
    .calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .summary()
    .fetch();

  console.log(summary.accountSid);
}

fetchSummary();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

summary = (
    client.insights.v1.calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .summary()
    .fetch()
)

print(summary.account_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Insights.V1.Call;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var callSummary =
            await CallSummaryResource.FetchAsync(pathCallSid: "CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

        Console.WriteLine(callSummary.AccountSid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.insights.v1.call.CallSummary;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        CallSummary callSummary = CallSummary.fetcher("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch();

        System.out.println(callSummary.getAccountSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	insights "github.com/twilio/twilio-go/rest/insights/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &insights.FetchSummaryParams{}

	resp, err := client.InsightsV1.FetchSummary("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.AccountSid != nil {
			fmt.Println(*resp.AccountSid)
		} else {
			fmt.Println(resp.AccountSid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$summary = $twilio->insights->v1
    ->calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->summary()
    ->fetch();

print $summary->accountSid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

summary = @client
          .insights
          .v1
          .calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
          .summary
          .fetch

puts summary.account_sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:insights:v1:voice:summary:fetch \
   --call-sid CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

```bash
curl -X GET "https://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Summary" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "call_sid": "CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "call_type": "carrier",
  "call_state": "ringing",
  "answered_by": "machine_start",
  "processing_state": "complete",
  "created_time": "2015-07-30T20:00:00Z",
  "start_time": "2015-07-30T20:00:00Z",
  "end_time": "2015-07-30T20:00:00Z",
  "duration": 100,
  "connect_duration": 99,
  "from": {},
  "to": {},
  "carrier_edge": {},
  "client_edge": {},
  "sdk_edge": {},
  "sip_edge": {},
  "tags": [
    "tags"
  ],
  "attributes": {},
  "properties": {},
  "trust": {
    "verified_caller": {
      "verified": true
    },
    "branded": {
      "enabled": true,
      "display_name": "Owl bank",
      "long_display_name": "Owl bank Ltd",
      "bundle_sid": "BU5ceeea51b1424478fc541dfef0e2b167",
      "logo": true,
      "type": "in_band",
      "use_case": "Customer Care",
      "call_reason": "Branded CTIA"
    },
    "business_profile": {
      "bundle_sid": "BU5ceeea51b1424478fc541dfef0e2b167",
      "identity": "direct_customer",
      "industry": "BANKING",
      "type": "corporate"
    },
    "voice_integrity": {
      "enabled": true,
      "bundle_sid": "BU5ceeea51b1424478fc541dfef0e2b167",
      "use_case": "customer_support"
    }
  },
  "annotation": {
    "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "answered_by": "human",
    "connectivity_issue": "invalid_number",
    "quality_issues": [
      "low_volume"
    ],
    "spam": true,
    "call_score": 2,
    "comment": "this is a call",
    "incident": "https://twilio.zendesk.com/support/tickets/17353089"
  },
  "url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Summary"
}
```

Fetch a partial Call Summary

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchSummary() {
  const summary = await client.insights.v1
    .calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .summary()
    .fetch({ processingState: "partial" });

  console.log(summary.accountSid);
}

fetchSummary();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

summary = (
    client.insights.v1.calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .summary()
    .fetch(processing_state="partial")
)

print(summary.account_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Insights.V1.Call;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var callSummary = await CallSummaryResource.FetchAsync(
            pathCallSid: "CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            processingState: CallSummaryResource.ProcessingStateEnum.Partial);

        Console.WriteLine(callSummary.AccountSid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.insights.v1.call.CallSummary;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        CallSummary callSummary = CallSummary.fetcher("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                      .setProcessingState(CallSummary.ProcessingState.PARTIAL)
                                      .fetch();

        System.out.println(callSummary.getAccountSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	insights "github.com/twilio/twilio-go/rest/insights/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &insights.FetchSummaryParams{}
	params.SetProcessingState("partial")

	resp, err := client.InsightsV1.FetchSummary("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.AccountSid != nil {
			fmt.Println(*resp.AccountSid)
		} else {
			fmt.Println(resp.AccountSid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$summary = $twilio->insights->v1
    ->calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->summary()
    ->fetch(["processingState" => "partial"]);

print $summary->accountSid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

summary = @client
          .insights
          .v1
          .calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
          .summary
          .fetch(processing_state: 'partial')

puts summary.account_sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:insights:v1:voice:summary:fetch \
   --call-sid CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
   --processing-state partial
```

```bash
curl -X GET "https://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Summary?ProcessingState=partial" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "call_sid": "CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "call_type": "carrier",
  "call_state": "ringing",
  "answered_by": "machine_start",
  "processing_state": "partial",
  "created_time": "2015-07-30T20:00:00Z",
  "start_time": "2015-07-30T20:00:00Z",
  "end_time": "2015-07-30T20:00:00Z",
  "duration": 100,
  "connect_duration": 99,
  "from": {},
  "to": {},
  "carrier_edge": {},
  "client_edge": {},
  "sdk_edge": {},
  "sip_edge": {},
  "tags": [
    "tags"
  ],
  "attributes": {},
  "properties": {},
  "trust": {
    "verified_caller": {
      "verified": true
    },
    "branded": {
      "enabled": true,
      "display_name": "Owl bank",
      "long_display_name": "Owl bank Ltd",
      "bundle_sid": "BU5ceeea51b1424478fc541dfef0e2b167",
      "logo": true,
      "type": "in_band",
      "use_case": "Customer Care",
      "call_reason": "Branded CTIA"
    },
    "business_profile": {
      "bundle_sid": "BU5ceeea51b1424478fc541dfef0e2b167",
      "identity": "direct_customer",
      "industry": "BANKING",
      "type": "corporate"
    },
    "voice_integrity": {
      "enabled": true,
      "bundle_sid": "BU5ceeea51b1424478fc541dfef0e2b167",
      "use_case": "customer_support"
    }
  },
  "annotation": {
    "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "answered_by": "human",
    "connectivity_issue": "invalid_number",
    "quality_issues": [
      "low_volume"
    ],
    "spam": true,
    "call_score": 2,
    "comment": "this is a call",
    "incident": "https://twilio.zendesk.com/support/tickets/17353089"
  },
  "url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Summary"
}
```
