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

# Voice Automation and Agent AI Integration with Genesys Cloud CX via SIP INVITE

[Back to Integrations List](https://koreai.mintlify.site/ai-for-service/contact-center/integrations/overview.md)

Step-by-step guide to hand over a call via SIP INVITE from Contact Center AI to Genesys Cloud CX, with Agent AI running on the Genesys Desktop.

***

## Prerequisites

* Contact Center AI, Automation AI, and Agent AI accounts with administrator access.
* Genesys Cloud CX account with admin role.
* Familiarity with creating Architect flows and External Trunks in Genesys.

***

## Contact Center AI Configuration

1. Sign in to Platform.

2. Go to **Contact Center AI > Flows & Channels**.

3. Click **Start Flows > + New Start Flow**. See [Create Flows](https://koreai.mintlify.site/ai-for-service/flows/create-and-manage-flows.md#create-a-start-flow).

   ![New Start Flow](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/new-start-flow-1.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=1451dbff70bdb5d495b40bb85eeb814b)

4. In the Experience Flow, add a **Script Node** with the following code:

   ```js theme={null}
   agentUtils.setAgentTranscribe({ transcribe: true });
   ```

   ![Experience Flow](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/experience-flow-2.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=266226c5a7680425269b57ea24cdc0d3)

5. Add an **Automation** node or other flow nodes for the conversation.

6. Add an **Agent Transfer** node to hand over the call to Genesys agents.

   ![Add Node in Experience Flow](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/add-node-in-experience-flo-3.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=104dec09e9be48d46b905d7b5807b2c5)

7. Publish the flow. Use **Test Flow** to verify the call connects to the correct flow.

***

## Configure Agent Transfer

1. Go to **App Settings > Integrations > Agent Transfer**.

   ![Integrations Agent Transfer](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/integrations-agent-transfer-4.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=b4d67e4b2d2331ed5daafd25f0c53be1)

2. Click **Voice > SIP Transfer** and configure:

   | Setting | Value |
   | - | - |
   | SIP Transfer Method | SIP INVITE |
   | SIP Transfer URI | `sip:+<DID>@koreSmartassist.byoc.mypurecloud.com` where `<DID>` is a DID number created in Genesys and the domain is the FQDN from the Genesys external trunk. |

   ![SIP Transfer](https://mintcdn.com/koreai/dI8V_rC3uZCEdMzk/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/sip-transfer-5.png?fit=max\&auto=format\&n=dI8V_rC3uZCEdMzk\&q=85\&s=83c70b9b4c99697f7d9fb6ce7aa850bb)

> [!NOTE]
>
> Using SIP INVITE, you can pass SIP headers to Genesys. Header keys must not contain spaces. Genesys supports reading up to 10 SIP headers via the **Get SIP Header** node in Architect. See the [Genesys configuration](#step-5-trunk) section for trunk FQDN details.

***

## Genesys Configuration

### Step 1 - Queue

Create an agent queue and add the necessary members for routing live agent transfers.

### Step 2 - Architect Flow

Create an Inbound Call Flow to handle calls transferred from CCAI.

1. Sign in to [Genesys Cloud](https://login.mypurecloud.com/).

2. Go to **Admin > Architect**.

   ![Admin Architect](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/admin-architect-6.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=b888b0953fb572382ba3e06473b79d18)

3. Click **+ Add** to create a new call flow.

   ![Add New Call Flow](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/add-new-call-flow-7.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=87147f3e796189e9834407a5f0acaaa9)

4. Enter a **Name** and **Description**, then click **Create Flow**.

5. Create tasks in the **Main Menu** or create a **Reusable Task** (mark as starting task from the three-dot menu).

6. After the **Start** node, add a **Get SIP Headers** node:

   * **SIP Header Names** (Literal): `x-conversationid`, `x-koresession-id`
   * **SIP Headers Result**: `Task.koreSIPheaders`

   ![Store SIP Headers Result](https://mintcdn.com/koreai/dI8V_rC3uZCEdMzk/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/store-sip-headers-result-9.png?fit=max\&auto=format\&n=dI8V_rC3uZCEdMzk\&q=85\&s=de55ae0d4eebd62d59a465ae972f2810)

   > [!NOTE]
   >
   > To find any node in Architect, click the three vertical dots on that node and select **Search Toolbox**.

7. Add a **Set Participant Data** node:

   * **Attribute name**: `koreSIPHeaders` (must be exact)
   * **Value** (Expression): `ToString(Task.koreSIPheaders)`

   ![Assign Value as Expression](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/assign-value-as-expression-10.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=885d96411a86b8aa4903287d44d069bc)

8. Add at least one **Transfer to ACD** node pointing to the agent queue.

9. Add a **Disconnect** node on the **Failure** path.

10. Save and publish the flow.

    > [!NOTE]
    >
    > You can also extract and inspect all available SIP headers.

    ![SIP Headers](https://mintcdn.com/koreai/dI8V_rC3uZCEdMzk/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/sip-headers.png?fit=max\&auto=format\&n=dI8V_rC3uZCEdMzk\&q=85\&s=83dc8061e62455931e4bb178bdc37882)

### Step 3 - DID Numbers

Create a single-number **DID Range** (start and end set to the same number, for example `+12223334444`) for internal routing inside Genesys.

> [!NOTE]
>
> This DID, combined with the trunk domain, forms the SIP Address used to INVITE the call from Kore Contact Center to Genesys.

![DID Range](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/did-range-11.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=610b71fe2b32b7a8ab0b6b751957192f)

* **Service Provider**: Internal
* Add a comment describing the range's purpose.

**DID Assignment**: Assign the number to the Call Route in Step 4.

* Assignee Type: Call Flow
* DID Number: Your number

### Step 4 - Call Route

1. Go to **Admin > Call Routing**.

2. Click **Add** to create a new call route.

   ![Add New Call Route](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/add-new-call-route-13.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=01f375547fa72f62a8b6198dc74b9232)

   ![Create Call Route](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/create-call-route-14.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=be8966853d9db2e6b27e8079cb2895c7)

3. Map the DID number (Step 3) to the call flow (Step 2).

### Step 5 - Trunk

Configure an external trunk connecting to the session border controller (SBC) for your region.

1. Sign in to [Genesys Cloud](https://login.mypurecloud.com/).

2. Go to **Admin > Telephony > External Trunks** (or search "External Trunks").

3. Click **+ Create New** and configure:

   | Setting | Value |
   | - | - |
   | External Trunk Name | Your name |
   | Type | BYOC Carrier |
   | Subtype | Generic BYOC Carrier |

   ![Create External Trunk](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/create-external-trunk-17.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=cc92a29c24d903edfa5da5a0745fcea9)

4. Select **Kore Site** in the **Number Plan Site** dropdown.

   ![Number Plan Site](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/number-plan-site-list-18.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=17f4a1a41961956ce61a106a139777d1)

5. Enter a unique name for **Inbound SIP Termination Identifier**.

6. The **Inbound Request-URI Reference** is auto generated:

   ![Inbound Request URI Reference](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/inbound-request-uri-reference-19.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=9e5a1391f2a67cd1ec36717c2604de6d)

   > [!NOTE]
   >
   > Add this FQDN Method URL (for example, `sip:+xxxxxxxxxxx@koreSmartassist.byoc.mypurecloud.com`) to the **SIP Transfer URI** field in the [Agent Transfer configuration](#configure-agent-transfer) on the Contact Center AI side.

7. In **SIP Access Control**, add the AI for Service voice gateway IPs:

   | Region | IP Addresses |
   | - | - |
   | US Prod | 3.224.189.218, 35.174.41.205 |
   | AU Prod | 54.153.137.7, 13.237.170.233 |

   ![SIP Access Control](https://mintcdn.com/koreai/dI8V_rC3uZCEdMzk/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/sip-access-control-field-20.png?fit=max\&auto=format\&n=dI8V_rC3uZCEdMzk\&q=85\&s=6d7c36db3af26d9db7626dce24215759)

8. Expand **Media** and enable **Recording**. Enable all **Optional Recording** options.

9. Set **Codec** to **Opus** and select **Dual channel**.

   ![Dual Channel](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/dual-channel-checkbox-21.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=435e404265a28224eecc1669756a0018)

10. Expand **Protocol** and enable **Conversation Headers**.

    ![Protocol Conversation Headers](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/protocol-conversation-headers-22.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=3b348b70e1ebaa45acffe80582a4dde7)

11. Click **Save External Trunk**.

    ![Save External Trunk](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/save-external-trunk-23.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=bfada33e9da3c484fdedd86c71d5f371)

> [!NOTE]
>
> * If **Media > Recording** isn't enabled, the end call summary in the Agent AI widget is unavailable. The middleware requires this setting to receive the session end event from Genesys.
> * If **Protocol > Conversation Headers** isn't enabled, the landing summary and real-time transcription in the Agent AI widget are unavailable.

***

## Agent AI Integration

### Add the Bot

Use the same automation bot used in the CCAI Automation Flow.

![Web Mobile Client](https://mintcdn.com/koreai/dI8V_rC3uZCEdMzk/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/web-mobile-client-24.png?fit=max\&auto=format\&n=dI8V_rC3uZCEdMzk\&q=85\&s=2269e54e08baaab4da87a8727924d45d)

### Integrate Agent AI with Genesys

Follow [Agent AI Integration with Genesys Cloud CX](https://koreai.mintlify.site/ai-for-service/agentai/integration/genesys/agent-ai-integration-with-genesys-cloud-cx).

**Configuration notes:**

1. When adding Agent AI bot credentials, use the bot added in the step above.

2. Add a new field in the Genesys data table:

   | Field | Value |
   | - | - |
   | Name | `isSipInviteTransferFromKore` |
   | Data Type | String |
   | Value | True |

   ![Genesys Data Table](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/genesys-data-table-25.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=8336ebd7287dcd69e591ca1f66fa496d)

3. Do **not** configure **audiohook** or enable **audiohook monitor** at the queue level.

4. Do **not** add the `isAudiohookEnabled` field in the data table.

***

## Test the Integration

Call the CCAI number purchased during setup. After a successful agent transfer, the signed-in Genesys agent can accept the incoming call.

1. Click **Answer** in Genesys.

   ![Accept Call in Genesys](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/accept-call-in-genesys-26.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=106607f503fd4d7be06fc7c9612176bc)

2. Open the **Tools** section and select the interaction widget configured during setup.

   ![Available Tools](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/available-tools-27.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=e587290480cf6e91b02c69f9d829bac0)

3. The Agent AI widget appears on the right side of the Genesys Agent Desktop.

   ![Agent AI Widget](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/agent-ai-widget-28.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=82ba9bf96402622db4f6bcf90abcf351)

4. Click the **Transcript** tab to view user-bot conversation history, a summary, and real-time transcripts.

   ![Transcript Tab](https://mintcdn.com/koreai/dI8V_rC3uZCEdMzk/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/transcript-tab-29.png?fit=max\&auto=format\&n=dI8V_rC3uZCEdMzk\&q=85\&s=17cd7d6e749652213270c9818ef2bb36)

***

## View Interaction Details in CCAI

1. Go to **CCAI > Analytics > Contact Center > Interactions**.
2. Click the interaction to view.

   ![Interaction to View](https://mintcdn.com/koreai/8xQ4O9aPwClT1yU0/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/interaction-to-view-30.png?fit=max\&auto=format\&n=8xQ4O9aPwClT1yU0\&q=85\&s=2177fc18b6050fb400d46ecb1ce71a36)

The dashboard shows all interaction details between the user and the bot, plus the conversation between the user and the live agent after the agent transfer.


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