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

# Five9

> Send Five9 calls to a Bland agent over SIP and transfer callers back to your Five9 agents

Put a Bland agent in front of, or alongside, your Five9 contact center. Five9 routes calls to Bland over a SIP trunk, the agent handles the conversation, and when a person is needed it transfers the caller back into Five9.

> [!NOTE]
>
> **Five9 AI Agent Connect partner.** Bland is an accredited Five9 AI Agent Connect partner. The SIP connection between Five9 and Bland is built and tested once in Five9's partner environment, and reused for each customer.

## What works

* Calls from Five9 to your agent
* Transfers from your agent back to Five9
* Call data passed to Five9 in SIP headers
* DTMF (RFC 2833)

## Prerequisites

* A Five9 contact center (VCC) account, and your Five9 account team
* A Bland account with SIP trunking enabled. If there is no **SIP** tab under **Phone numbers**, contact Bland support
* A Bland agent ready to answer, so the interop test exercises the real conversation

## How the call flows

```text theme={null}
Caller ──> Five9 ──SIP/TLS──> Bland agent ──transfer──> Five9 skill or agent
```

Your Five9 IVR script sends the call to a number that routes over the SIP trunk to Bland, and the agent assigned to that number answers. To hand back, a **Transfer Call** node sends the caller to a Five9 number: Bland places a new `INVITE` to Five9 over the same trunk and bridges the audio.

Signaling uses TLS on port 5061 and audio uses SRTP. Five9 recommends TLS, and Bland accepts TLS only.

## Order and configure Five9

**1. Order AI Agent Connect**

Ask your Five9 account team for a quote for **AI Agent Connect**, with Bland as the AI agent partner. If you are not a Five9 customer yet, your Bland account team can register the opportunity with Five9.

Five9 then opens a project, and Five9 Professional Services works with you on the IVR script.

**2. Give Five9 the Bland connection details**

Five9 Professional Services and your Five9 administrator need:

* **Endpoint**: your Bland region, for example `us2.sip.bland.ai`. The other regions are under [Connection endpoints](https://docs.bland.ai/agents/sip-network.md#connection-endpoints)
* **Transport**: TLS 1.2 or higher, port 5061
* **Media**: SRTP (`AES_CM_128_HMAC_SHA1_80`), UDP 16384 to 32768
* **Trusted peers**: all six Bland IPs for your region, signaling and media
* **Certificate**: Let's Encrypt. The ISRG Root X1 CA must be trusted
* **Number format**: E.164 or 10-digit. Bland accepts both

**3. Route calls to Bland in Five9**

Label the numbers that should reach Bland so they route over the Bland SIP trunk, not the PSTN. In your IVR script, send calls to those numbers where the agent should take over.

**4. Tell Bland which numbers to use**

Send your Bland account team the numbers Five9 will route to Bland, and the Bland organization they belong to. Bland attaches them to your organization and allow-lists Five9's SIP addresses.

Also note the Five9 numbers or skills your agent should transfer callers back to.

> [!NOTE]
>
> Some existing deployments use a dedicated SIP trunk ordered through Five9 Professional Services and configured with the Five9 SIP Workbook. That still works, but Five9 has noted it doesn't include a transfer module. Start new deployments with AI Agent Connect.

## Configure Bland

**1. Assign an agent**

Once Bland attaches your numbers, go to **All agents**, then **Dispatch**, then **Phone numbers**. Press **Configure** on each number and pick the agent under **Assignment**.

**2. Add the transfer back to Five9**

In the agent, add a **Transfer Call** node that sends the caller to the Five9 number for the right skill. See [Transfers](https://docs.bland.ai/agents/sip-transfers.md) for how transfers behave on SIP calls.

**3. Pass call data to the Five9 agent**

To hand over details such as an account number or the reason for the call, map call variables to SIP headers in the **Headers** section of the trunk's **Configure** tab. See [Custom headers](https://docs.bland.ai/agents/sip-transfers.md#custom-headers).

## Test before go-live

Five9 requires a successful interop test before it allows go-live. Plan for:

* **Real test numbers**, labeled for the Bland trunk on your Five9 domain. Five9 doesn't accept Twilio numbers or Five9-owned numbers as test numbers
* **Every call path**. When Five9 assigns a primary and a secondary SBC, test through both
* **The whole call**: two-way audio, DTMF, hold, and a transfer back to a live Five9 agent
* **A Five9 user logged in as an agent**, so transfers back to Five9 have someone to land on

Compare each test call's SIP trace on the trunk's **Overview** tab with Five9's logs.

## Common failures

> [accordion] Five9's SIP OPTIONS ping to Bland times out
>
> Bland doesn't have Five9's current SBC IPs, or Five9 is pinging over UDP or port 5060. Send Bland the current SBC IPs, and check Five9 sends TLS to port 5061.

> [accordion] Calls are rejected with 603 Decline
>
> The number isn't attached to your Bland organization. Send it to your Bland account team.

> [accordion] Calls go to Five9 voicemail or stay inside Five9
>
> The number is still an internal Five9 inbound number. Re-label it in Five9 so it routes out the Bland trunk.

> [accordion] Test calls go over the phone network instead of the trunk
>
> The test number isn't routed over the trunk on both sides. Label it for the Bland trunk in Five9, and confirm Bland attached it.

> [accordion] Calls drop mid-call with 481 Call/Transaction Does Not Exist
>
> Five9 has Bland's IPs on more than one trunk. Ask Five9 to keep them on a single trunk.

> [accordion] The call connects with no audio
>
> SRTP isn't on, or Bland's media IPs aren't trusted. Enable SRTP toward Bland, and trust all six Bland IPs for your region.

> [accordion] The transfer back to Five9 fails or lands in the wrong queue
>
> The transfer number isn't routed to a skill in the Five9 script. Check the script, and that a Five9 agent with that skill is logged in.

## Next steps

> [card] [Transfers](https://docs.bland.ai/agents/sip-transfers.md)
>
> Transfer methods and custom headers.

> [card] [Network and security](https://docs.bland.ai/agents/sip-network.md)
>
> Bland's regions, IPs, and TLS and SRTP.

Docs for agents: [llms.txt](https://docs.bland.ai/llms.txt)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.