> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-agentplatform-dev.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CCAI voice transfer

<Badge icon="arrow-left" color="gray">[Back to CCAI integration](/agent-platform/integrations/ccai)</Badge>

This article covers the SIP-based voice call transfer from an Artemis voice agent to a human agent in CCAI: creating the SIP trunk, binding it to a human destination, configuring Artemis for SIP REFER, wiring the ABL, and testing the live call handoff.

<Note>
  Complete [Step 1: Contact Center app configuration](/agent-platform/integrations/ccai#step-1-contact-center-app-configuration) and [Step 2: Artemis project configuration](/agent-platform/integrations/ccai#step-2-artemis-project-configuration) in [CCAI integration](/agent-platform/integrations/ccai) before you start. Those steps are required for both digital and voice channels.
</Note>

## Prerequisites

* The shared connection setup in [CCAI integration](/agent-platform/integrations/ccai) is complete and the integration status shows **Enabled**.
* Artemis production and your CCAI production environment are in the **same cloud region/cluster**. This keeps the transfer on the internal Kore voice gateway. If the environments are in different clusters, the call leaves the Kore network and requires a purchased PSTN number and provider routing.
* **App Owner** role in CCAI. A standard builder role can't complete every integration and telephony step.
* An available CCAI queue or named agent, and access to the CCAI Agent Console.
* Two separate audio endpoints for the final test: the caller on a phone or a telephony-enabled video call, and the human agent on a separate device.
* Approved secret storage for the Artemis Platform Key and the shared webhook secret.

## End-to-end path

```mermaid actions={false} theme={null}
%%{init: {'theme': 'base', 'themeVariables': {'background': 'transparent', 'primaryColor': '#EAF8E4', 'primaryTextColor': '#1a1a1a', 'primaryBorderColor': '#5CC83A', 'lineColor': '#5CC83A', 'secondaryColor': 'transparent', 'tertiaryColor': 'transparent', 'clusterBkg': 'transparent', 'clusterBorder': '#5CC83A', 'titleColor': '#1a1a1a', 'clusterLabelBackground': 'transparent', 'edgeLabelBackground': '#EAF8E4'}}}%%
flowchart LR
    A[Caller] --> B[Artemis voice agent]
    B -->|call_transfer sip| C[SIP REFER]
    C --> D[CCAI SIP trunk]
    D --> E[Start Flow]
    E --> F[Human agent]
```

## Step 1: Create the CCAI SIP trunk and routing number

Go to **Contact Center AI** → **Flows & Channels** → **Voice Gateway** → **SIP Numbers** → **Configure SIP Trunk**. This creates the internal destination that Artemis will REFER the call to.

| **CCAI SIP field**        | **Known-good baseline**                                                                                                              |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| SIP URI                   | Generated by CCAI. Example: `sip:savg-cusprd-sbc1.kore.ai:5060`                                                                      |
| Network                   | List of IP addresses.                                                                                                                |
| Incoming IPs              | Example: `54.172.60.0, 54.172.60.3, 54.244.51.0, 54.244.51.3`; confirm the current tenant allowlist with telephony administration.   |
| E.164 Syntax              | Checked                                                                                                                              |
| DID / routing ID          | A unique routing identifier, such as `4848898755`. On this same-cluster internal path it does not need to be a purchased public DID. |
| DTMF Types                | `RFC 2833`                                                                                                                           |
| SIP Transport             | `UDP`                                                                                                                                |
| Credentials / termination | Optional. Leave blank unless a Kore telephony administrator gives you tenant-specific values.                                        |

<Note> Keep exactly one leading `sip:` in the resulting SIP number (`sip:<routing-id>@<host>:5060`). A double `sip:` prefix breaks the destination.</Note>

## Step 2: Route the SIP number to a human destination

1. Click **Next**. Reserve or select the SIP routing number and enable **Inbound Calls**. Select the intended CCAI app.
2. Create a **Call Start Flow**. Supply a non-empty description and select the SIP number when prompted.
3. Connect the Start node to an **Agent Transfer** node, then choose the intended queue, skill, or named employee.
4. For every receiving employee, enable Contact Center access, Agent Console as the default experience, Voice, and the required queue/skill membership.
5. Publish the Start Flow.

<Note>
  Attaching a Start Flow can return an already-published CCAI app to **In Development**. Republish the app after this step (see Step 3).
</Note>

Before moving on, confirm:

* Agent Console is open and the human agent is **Available**.
* The target queue/skill or named-agent route is correct.
* The app and every relevant voice flow show **Published**.

## Step 3: Publish the CCAI app

Publish the CCAI app and all affected voice/Start flows.

## Step 4: Configure Artemis agent transfer for SIP REFER

In Artemis, go to **Project Settings → Agent Transfer** and enter the following configurations under **Voice Gateway**, in addition to the **Default Routing connection** configured in [CCAI integration](/agent-platform/integrations/ccai#set-up-digital-channel-routing):

| **Setting**                  | **Value**                                                                                                                                                                  |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Gateway Type                 | `Kore Voice Gateway`                                                                                                                                                       |
| Transfer Method              | `SIP REFER`. The underlying `transfer_method` parameter also accepts `invite` or `bye`; use `refer` (SIP REFER) unless your design calls for a different signaling method. |
| Header Passthrough           | On                                                                                                                                                                         |
| SIP Transfer Target URI      | `sip:<routing-id>@<sbc-host>:5060` with exactly one `sip:` prefix.                                                                                                         |
| PSTN target                  | Blank for an internal, same-cluster SIP path                                                                                                                               |
| SIP URI is SmartAssist trunk | `On`. This is required for SmartAssist transcript/recording synchronization and two-way audio.                                                                             |
| Allowed Transfer Headers     | Optional; add only headers required by your queue/skill routing design. [Learn More](/agent-platform/sending-custom-sip-headers).                                          |

## Step 5: Configure the voice-transfer mechanism in the ABL

Use the [`Escalate` block](/agent-platform/abl/reference/multi-agent-and-supervisor#escalate) with `routing.voice.call_transfer_type` set to `sip` (and `transfer_method` set to `refer`, `invite`, or `bye`) to drive the live SIP call handoff. This is the recommended pattern — it works unchanged for chat and voice, with no separate tool definition needed:

```yaml theme={null}
ESCALATE:
  routing:
    - voice: { call_transfer_type: sip, transfer_method: refer }
      # transfer_method: refer | invite | bye
```

Alternatively, you can call the `call_transfer` tool directly. If you do, define it in the TOOLS block as follows:

```yaml theme={null}
TOOLS:
  call_transfer(callTransferType: string, phoneNumber?: string, sipTransferId?: string, message?: string, headers?: object) -> object
    description: "Transfer the live voice call to a human agent over SIP. Call this whenever the caller asks for a human, an agent, a representative, or to be transferred. Always pass callTransferType as sip."
```

Add a clear PERSONA instruction so the agent invokes the transfer promptly and only on a genuine request:

* When the caller explicitly asks to speak with or be transferred to a human employee, representative, live agent, customer-service agent, or real person, invoke the transfer immediately with `callTransferType` set to `sip`. Don't continue troubleshooting, offer alternatives, or ask a follow-up question before calling the tool.
* Never merely say that a transfer is starting, underway, or complete. Invoke the transfer and rely on its result.
* Don't treat negated, hypothetical, quoted, historical, or third-party mentions of a human representative as a transfer request.

The TOOLS block may appear before or after PERSONA; ABL construct order isn't significant. Compile, lint, and validate before deploying. Non-blocking metadata warnings don't replace runtime validation.

## Step 6: Deploy and bind the voice channel in Artemis

<Note>
  Saving an ABL change updates only the draft. It doesn't change the behavior of a live call until you create and bind a new deployment.
</Note>

1. Open **Artemis → Deployments** and choose the environment used by the Realtime Voice channel.
2. Create a deployment, choose **Customize per agent**, and select **Auto-create from draft** for the voice agent. Confirm the correct Entry Agent, then deploy. The previous deployment can keep draining; it doesn't have to be retired first.
3. Go to **Channels**, open the Realtime Voice channel, and confirm it points to the same environment and the newly active deployment/version.
4. Configure other channel properties and save.
5. Confirm the Artemis Realtime Voice channel has a working inbound DID if dialing from a phone. **This public inbound DID is different from the CCAI SIP routing ID.**

After deployment, start a brand-new voice call to pick up the change; existing sessions keep the runtime state they began with. Verify the Realtime Voice channel binding every time you create a new version — the agent configuration can be correct while live calls still use an older deployment.

## Step 7: Test and verify

<Warning>
  Don't use the SmartAssist browser softphone for the final test — voice transfer doesn't work correctly from that path. Call the Artemis agent from an external mobile phone or a telephony-enabled video call (for example, Google Meet), and keep the human CCAI Agent Console on a separate machine/audio endpoint when possible.
</Warning>

1. Publish the CCAI app and all affected voice/Start flows. Confirm the human agent is **Available** before dialing.
2. Call the Artemis agent and say a test phrase such as **"Transfer me to a human agent."**
3. Verify the expected Artemis behavior: the `call_transfer` tool is invoked with `callTransferType=sip`. The configured transition message (if any) plays once, and a SIP REFER/transfer session begins.
4. Verify the expected CCAI behavior: a new voice interaction is offered to the configured queue or agent. Accept the interaction.
5. Confirm success: the AI stops responding to the caller, the human and caller hear one another, and two-way audio continues until the human ends the call.

Evidence to inspect:

* **Artemis Sessions/Trace:** a `call_transfer` tool invocation, not only an escalation event.
* **Artemis Transfer Sessions:** provider **SmartAssist**, channel **voice**, and a successful/connected lifecycle.
* **CCAI Agent Console:** offered interaction, assigned queue/agent, acceptance, and connected state.
* **Audio:** caller and human can interrupt/respond naturally; the AI no longer answers after acceptance.

## Troubleshoot voice transfer issues

| What you observe                                                      | Most likely cause / next action                                                                                                                                       |
| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| AI never answers                                                      | Fix the Artemis Realtime Voice inbound DID/provider/channel binding. The transfer ABL can't run before an Artemis session exists.                                     |
| AI promises a transfer, but no CCAI offer                             | Confirm the live ABL calls the transfer with `sip`, the draft was deployed, and the voice channel is bound to that deployment.                                        |
| Transfer session starts, but no CCAI offer                            | Check the active SmartAssist connection, CCAI Artemis Integration status, SIP target, Start Flow, app publish status, and agent/queue availability.                   |
| CCAI offer is accepted, but there's silence and the AI still responds | Turn on **SIP URI is SmartAssist trunk**; confirm SIP REFER, the single-prefix target URI, and that the test didn't originate from the SmartAssist browser softphone. |
| SIP target doesn't connect                                            | Remove any double `sip:` prefix. Use `sip:<routing-id>@<sbc-host>:5060`.                                                                                              |
| Studio/soft test differs from a phone test                            | Use the supported external phone/video-call path. If a public carrier intercept occurs before an Artemis session, repair inbound DID/provider provisioning.           |
| Changes look right but old behavior remains                           | Republish CCAI after flow changes; create a new Artemis deployment after ABL changes; start a new call.                                                               |

## Final go/no-go checklist

* Artemis and CCAI are on matching production environments, and the CCAI user is App Owner.
* The CCAI SIP trunk and routing number exist; the Call Start Flow routes to a real human destination and is published.
* The Artemis Integration fields are saved in CCAI, and the corresponding connection fields in Artemis are populated.
* A new agent version/deployment is active, and Realtime Voice is bound to it.
* Agent Transfer uses Kore Voice Gateway, SIP REFER, the correct SIP target, and SmartAssist trunk **On**.
* A new external voice test produces a CCAI offer, human acceptance, AI disengagement, and two-way audio.

## Points to note

* **Conversation transcripts and recordings**: Recordings and transcripts from voice calls in CCAI are available in Artemis after the session ends, under Sessions logs. It may take up to 10 minutes to present them in Artemis due to post-session processing.

***

**Related articles:**

* [CCAI integration](/agent-platform/integrations/ccai)
* [Sending custom SIP headers](/agent-platform/sending-custom-sip-headers)
* [Escalate block reference](/agent-platform/abl/reference/multi-agent-and-supervisor#escalate)
* [Transfer sessions](/agent-platform/transfer-sessions)
