---
title: "Contact centers"
description: "Send calls from Amazon Connect, Five9, Genesys Cloud, Talkdesk, Twilio, Microsoft Dynamics 365, NICE CXone or Zoom Contact Center to a ThunderPhone agent over SIP, and get them back with the agent's hand-off."
---

A ThunderPhone agent can answer calls inside your contact center's call flow.
Your platform sends the call to the agent's [SIP address](/guides/sip-addresses)
with SIP headers that carry its own call id and anything else it knows about
the caller. When the caller needs a person, the agent hands the call back with
a hand-off: a summary of what the caller needs, a short intent label and an id
your flow can look up.

## Platforms

| Platform | How the call arrives | Call-id header | How it comes back | How the context gets back |
|---|---|---|---|---|
| [Amazon Connect](/guides/contact-centers/amazon-connect) | External voice transfer connector; IP allowlist | `X-Amzn-ConnectContactId` | Return: the agent hangs up and the flow resumes | A Lambda calls the hand-off lookup |
| [Five9](/guides/contact-centers/five9) | AI Agent Connect, set up by Five9, to a dial-in number; IP allowlist | `X-CallID` | Return: the agent hangs up with routing headers on the `BYE` | `X-Route*` and `X-CustomMetaData` headers into IVR call variables |
| [Genesys Cloud](/guides/contact-centers/genesys-cloud) | BYOC Cloud trunk; digest | `x-inin-cnv` | `REFER`, accepted by Take Back and Transfer | Hex UUI inside the transfer address, then a data action |
| [Talkdesk](/guides/contact-centers/talkdesk) | Connect to Autopilot Voice; IP allowlist | `X-Talkdesk-Interaction-Id` | `REFER` to Talkdesk's escalation address | Hex UUI inside the transfer address, then Execute Action |
| [Twilio](/guides/contact-centers/twilio) | `<Dial><Sip>`; digest | `X-Call-ID`, which you add | `REFER` to your `referUrl` handler | Headers inside the transfer address (`ReferTransferTarget`) |
| [Microsoft Dynamics 365](/guides/contact-centers/microsoft-dynamics-365) | Transfer to a phone number, through your SBC; digest | `X-Call-ID`, which you add | Return, then your SBC routes the caller back | HTTP Request node calls the hand-off lookup |
| [NICE CXone](/guides/contact-centers/nice-cxone) | Studio `Placecall` with `Sipputheader`, to a dial-in number; IP allowlist | `X-Call-ID`, which you add | Return: the agent hangs up (confirm with NICE how the script takes the caller back) | REST API action calls the hand-off lookup |
| [Zoom Contact Center](/guides/contact-centers/zoom-contact-center) | Bot widget on a trunk Zoom builds, to a dial-in number; IP allowlist with SRTP | `X-ZOOM-Call-Sid` | `REFER` to Zoom's human-agent address | HTTP Call widget calls the hand-off lookup |

## How it works

1. **Create a SIP endpoint** for the agent. Platforms that can answer a
   password challenge use the endpoint's username and password. Platforms that
   identify themselves only by their source addresses use an endpoint with
   `auth` set to `ip_allowlist`; see
   [Platforms that authenticate by source IP](/guides/sip-addresses#platforms-that-authenticate-by-source-ip).
   Platforms that dial a phone number rather than a SIP address reach the
   endpoint through its
   [dial-in numbers](/guides/sip-addresses#platforms-that-dial-a-phone-number).
2. **Send calls with context.** The platform dials the endpoint's `sip_uri` or
   a dial-in number.
   Every `X-` header and `User-to-User` it sends becomes a `{{sip_…}}` call
   variable the prompt can use, and its call-id header is stored as the
   call's `external_call_id`. See
   [Pass call context in SIP headers](/guides/sip-addresses#pass-call-context-in-sip-headers).
3. **Add one transfer number that hands the call back**, either a SIP address
   on your platform (the agent sends a `REFER`) or a
   [return](/guides/call-transfers#return-the-call-to-your-contact-center)
   (the agent hangs up and your flow carries on). Its headers can carry
   `{{handoff_summary}}`, `{{handoff_intent}}` and `{{handoff_id}}`; see
   [Pass context to your contact center](/guides/call-transfers#pass-context-to-your-contact-center).
4. **Read the hand-off** where your platform puts it, or look it up by your
   platform's call id.

### Add the transfer number

SIP addresses, returns and their headers are set with the
[Agents API](/api-reference/agents#transfer-numbers). A write replaces the
whole list, so include the agent's other transfer numbers, then deploy:

```bash
curl -X PATCH https://api.thunderphone.com/v1/agents/12 \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"transfer_destinations": [{"name": "Contact center", "action": "return"}]}'

curl -X POST https://api.thunderphone.com/v1/agents/12/deploy \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"
```

Then tell the agent when to use it, by name, in its prompt: "When the caller
asks for a person, or you can't resolve the request, transfer to Contact
center."

### Look up the hand-off

Your flow can fetch the hand-off with your organization's API key and your
platform's call id:

```bash
curl "https://api.thunderphone.com/v1/calls/handoff?external_call_id=YOUR_PLATFORM_CALL_ID" \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"
```

The response has `handoff.summary`, `handoff.intent` and `handoff.handoff_id`,
the SIP headers and variables the call started with and, once the call has
ended, its summary and extracted data. You can also look a call up by
`handoff_id`. See
[Look up a handed-off call](/api-reference/calls#look-up-a-handed-off-call).

Keep the API key in your platform's credential store, not in the flow itself.

<Warning>
  Header values come from whoever sends the call. Use them as context in the
  prompt, not to decide who the caller is or what they may do.
</Warning>

## Guides

<CardGroup cols={2}>
  <Card title="Amazon Connect" icon="phone" href="/guides/contact-centers/amazon-connect">
    External voice transfer in, return and a Lambda lookup back.
  </Card>
  <Card title="Five9" icon="phone" href="/guides/contact-centers/five9">
    AI Agent Connect in, routing headers on the hang-up back.
  </Card>
  <Card title="Genesys Cloud" icon="phone" href="/guides/contact-centers/genesys-cloud">
    BYOC Cloud trunk in, Take Back and Transfer with UUI back.
  </Card>
  <Card title="Talkdesk" icon="phone" href="/guides/contact-centers/talkdesk">
    Connect to Autopilot Voice in, escalation with UUI back.
  </Card>
  <Card title="Twilio" icon="phone" href="/guides/contact-centers/twilio">
    TwiML Dial in, a REFER to your referUrl handler back.
  </Card>
  <Card title="Microsoft Dynamics 365" icon="phone" href="/guides/contact-centers/microsoft-dynamics-365">
    Transfer through your SBC in, return and an HTTP lookup back.
  </Card>
  <Card title="NICE CXone" icon="phone" href="/guides/contact-centers/nice-cxone">
    Studio Placecall in, return and a REST lookup back.
  </Card>
  <Card title="Zoom Contact Center" icon="phone" href="/guides/contact-centers/zoom-contact-center">
    Bot widget in, a REFER to a human agent back.
  </Card>
</CardGroup>
