> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# Voice in Twilio Flex

> Route AI Phone calls into Flex as voice tasks with transcript attached so reps pick up mid-call with full context.

Voice calls handled by AI Phone route as <Tooltip tip="A TaskRouter task representing an active phone call. Assignment moves the call leg to the assigned worker.">voice tasks</Tooltip> in Flex. When the AI escalates mid-call, the call transfers to your rep with the transcript already attached.

## Pre-requisites

<Warning>
  **Set up AI Phone first.** Flex voice handoff depends on AI Phone being wired up end-to-end — start with [AI Phone Support](/phone/introduction) and come back here.
</Warning>

* **AI Phone configured and receiving calls** — see [AI Phone Support](/phone/introduction).
* **Twilio Flex credentials saved** — see [Connect Twilio Flex](/integrations/twilio-flex/connect).
* **Both webhooks registered** (TaskRouter + Conversations service).

## How calls land in Flex

```mermaid theme={"dark"}
flowchart LR
  A[Caller dials number] --> B[AI picks up]
  B --> C{AI can resolve?}
  C -- Yes --> D[Caller hangs up]
  C -- No --> E[Handoff attribute set on task]
  E --> F[Workflow routes to human queue]
  F --> G[Call transfers to rep]
```

## What the rep sees

* A **voice task** in the Flex UI with the call already connected on accept.
* The call transcript so far, rendered in the conversation thread attached to the task.
* The handoff note above the transcript with summary, sentiment, and reason.
* The six `handoff*` attributes on the task panel.
* Caller number, any `flex_*` custom data set during routing.

## Channel-specific details

<AccordionGroup>
  <Accordion title="Warm transfer vs cold handoff" icon="arrow-right-arrow-left">
    OpenCX performs a cold handoff by default — the AI releases the call and your workflow routes it to a human queue. For warm transfers (AI introduces the rep on the line before dropping off), configure it inside your Flex workflow; OpenCX does not orchestrate warm-transfer TwiML on your behalf.
  </Accordion>

  <Accordion title="Transcript timing" icon="clock">
    The transcript is appended to the conversation as the AI and caller speak. On handoff, the most recent turns are guaranteed to be present; occasional sub-second tail segments may land a moment after the task is assigned.
  </Accordion>

  <Accordion title="Call recording" icon="circle-dot">
    Call recordings follow whatever your Twilio Voice configuration sets — OpenCX does not add or strip recording. If you rely on Twilio recordings for QA, the recording SID is on the call, not on the task.
  </Accordion>

  <Accordion title="IVR skip-ahead" icon="forward">
    If your number routes through an IVR before reaching the AI, OpenCX only sees the portion of the call after it picks up. Earlier IVR selections are not in the transcript unless your IVR passes them as task attributes.
  </Accordion>
</AccordionGroup>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="AI Phone Support" icon="phone" href="/phone/introduction">
    The channel itself — numbers, IVR, voice model.
  </Card>

  <Card title="Connect Twilio Flex" icon="plug" href="/integrations/twilio-flex/connect">
    Credentials, webhook, workflow filters.
  </Card>

  <Card title="Twilio Flex overview" icon="headset" href="/integrations/twilio-flex/overview">
    What else Flex lights up across every channel.
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/integrations/twilio-flex/troubleshooting">
    Missing task, wrong queue, events routed to the wrong org.
  </Card>
</CardGroup>
