# Twilio Voice (/integrations/twilio_voice)





{/* MANUAL-CONTENT-START:intro */}

[Twilio Voice](https://www.twilio.com/en-us/voice) connects phone calls to workflows. Use this integration to place outbound calls, list calls, retrieve recordings, and receive call events through a webhook. Supply the call instructions and phone numbers required by the selected operation.

{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]

Make outbound calls, list calls, retrieve recordings, and receive call events through webhooks.

## Actions [#actions]

### Twilio Voice Make Call [#twilio-voice-make-call]

Make an outbound phone call using Twilio Voice API.

<ReferenceDetails>
  #### Input [#input]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `to` | string | Yes | Phone number to call in E.164 format (e.g., +14155551234) |
  | `from` | string | Yes | Your Twilio phone number to call from in E.164 format (e.g., +14155559876) |
  | `url` | string | No | Webhook URL that returns TwiML instructions for the call (e.g., [https://example.com/twiml](https://example.com/twiml)) |
  | `twiml` | string | No | TwiML instructions to execute. Use square brackets instead of angle brackets (e.g., \[Response]\[Say]Hello\[/Say]\[/Response]) |
  | `statusCallback` | string | No | Webhook URL for call status updates |
  | `statusCallbackMethod` | string | No | HTTP method for status callback (GET or POST) |
  | `accountSid` | string | Yes | Twilio Account SID |
  | `authToken` | string | Yes | Twilio Auth Token |
  | `record` | boolean | No | Whether to record the call |
  | `recordingStatusCallback` | string | No | Webhook URL for recording status updates |
  | `timeout` | number | No | Time to wait for answer before giving up (seconds, default: 60) |
  | `machineDetection` | string | No | Answering machine detection: Enable or DetectMessageEnd |

  #### Output [#output]

  | Parameter | Type | Description |
  | - | - | - |
  | `success` | boolean | Whether the call was successfully initiated |
  | `callSid` | string | Unique identifier for the call |
  | `status` | string | Call status (queued, ringing, in-progress, completed, etc.) |
  | `direction` | string | Call direction (outbound-api) |
  | `from` | string | Phone number the call is from |
  | `to` | string | Phone number the call is to |
  | `duration` | number | Call duration in seconds |
  | `price` | string | Cost of the call |
  | `priceUnit` | string | Currency of the price |
  | `error` | string | Error message if call failed |
</ReferenceDetails>

### Twilio Voice List Calls [#twilio-voice-list-calls]

Retrieve a list of calls made to and from an account.

#### Input [#input-1]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `accountSid` | string | Yes | Twilio Account SID |
| `authToken` | string | Yes | Twilio Auth Token |
| `to` | string | No | Filter by calls to this phone number in E.164 format (e.g., +14155551234) |
| `from` | string | No | Filter by calls from this phone number in E.164 format (e.g., +14155559876) |
| `status` | string | No | Filter by call status (e.g., queued, ringing, in-progress, completed, busy, failed, no-answer, canceled) |
| `startTimeAfter` | string | No | Filter calls that started on or after this date (YYYY-MM-DD) |
| `startTimeBefore` | string | No | Filter calls that started on or before this date (YYYY-MM-DD) |
| `pageSize` | number | No | Number of records to return (max 1000, default 50) |

#### Output [#output-1]

| Parameter | Type | Description |
| - | - | - |
| `success` | boolean | Whether the calls were successfully retrieved |
| `calls` | array | Array of call objects |
| `total` | number | Total number of calls returned |
| `page` | number | Current page number |
| `pageSize` | number | Number of calls per page |
| `error` | string | Error message if retrieval failed |

### Twilio Voice Get Recording [#twilio-voice-get-recording]

Retrieve call recording information and transcription (if enabled via TwiML).

#### Input [#input-2]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `recordingSid` | string | Yes | Recording SID to retrieve (e.g., RExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) |
| `accountSid` | string | Yes | Twilio Account SID |
| `authToken` | string | Yes | Twilio Auth Token |

#### Output [#output-2]

| Parameter | Type | Description |
| - | - | - |
| `success` | boolean | Whether the recording was successfully retrieved |
| `recordingSid` | string | Unique identifier for the recording |
| `callSid` | string | Call SID this recording belongs to |
| `duration` | number | Duration of the recording in seconds |
| `status` | string | Recording status (completed, processing, etc.) |
| `channels` | number | Number of channels (1 for mono, 2 for dual) |
| `source` | string | How the recording was created |
| `mediaUrl` | string | URL to download the recording media file |
| `file` | file | Downloaded recording media file |
| `price` | string | Cost of the recording |
| `priceUnit` | string | Currency of the price |
| `uri` | string | Relative URI of the recording resource |
| `transcriptionText` | string | Transcribed text from the recording (if available) |
| `transcriptionStatus` | string | Transcription status (completed, in-progress, failed) |
| `transcriptionPrice` | string | Cost of the transcription |
| `transcriptionPriceUnit` | string | Currency of the transcription price |
| `error` | string | Error message if retrieval failed |

## Triggers [#triggers]

A trigger starts a workflow when a supported event occurs in this service.

### Twilio Voice Webhook [#twilio-voice-webhook]

Trigger workflow when phone calls are received via Twilio Voice

<ReferenceDetails label="Configuration and outputs">
  #### Configuration [#configuration]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `accountSid` | string | Yes | Your Twilio Account SID from the Twilio Console |
  | `authToken` | string | Yes | Your Twilio Auth Token for webhook signature verification |
  | `twimlResponse` | string | No | TwiML instructions to return immediately to Twilio. Use square brackets instead of angle brackets (e.g., \[Response] instead of \<Response>). This controls what happens when the call comes in (e.g., play a message, record, gather input). Your workflow will execute in the background. |

  #### Output [#output-3]

  | Parameter | Type | Description |
  | - | - | - |
  | `callSid` | string | Unique identifier for this call |
  | `accountSid` | string | Twilio Account SID |
  | `from` | string | Caller's phone number (E.164 format) |
  | `to` | string | Recipient phone number (your Twilio number) |
  | `callStatus` | string | Status of the call (queued, ringing, in-progress, completed, etc.) |
  | `direction` | string | Call direction: inbound or outbound |
  | `apiVersion` | string | Twilio API version |
  | `callerName` | string | Caller ID name if available |
  | `forwardedFrom` | string | Phone number that forwarded this call |
  | `digits` | string | DTMF digits entered by caller (from \<Gather>) |
  | `speechResult` | string | Speech recognition result (if using \<Gather> with speech) |
  | `recordingUrl` | string | URL of call recording if available |
  | `recordingSid` | string | Recording SID if available |
  | `called` | string | Phone number that was called (same as "to") |
  | `caller` | string | Phone number of the caller (same as "from") |
  | `toCity` | string | City of the called number |
  | `toState` | string | State/province of the called number |
  | `toZip` | string | Zip/postal code of the called number |
  | `toCountry` | string | Country of the called number |
  | `fromCity` | string | City of the caller |
  | `fromState` | string | State/province of the caller |
  | `fromZip` | string | Zip/postal code of the caller |
  | `fromCountry` | string | Country of the caller |
  | `calledCity` | string | City of the called number (same as toCity) |
  | `calledState` | string | State of the called number (same as toState) |
  | `calledZip` | string | Zip code of the called number (same as toZip) |
  | `calledCountry` | string | Country of the called number (same as toCountry) |
  | `callerCity` | string | City of the caller (same as fromCity) |
  | `callerState` | string | State of the caller (same as fromState) |
  | `callerZip` | string | Zip code of the caller (same as fromZip) |
  | `callerCountry` | string | Country of the caller (same as fromCountry) |
  | `callToken` | string | Twilio call token for authentication |
  | `raw` | string | Complete raw webhook payload from Twilio as JSON string |
</ReferenceDetails>
