> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-apis.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

<Badge icon="arrow-left" color="gray">[Back to Integrations List](/ai-for-service/contact-center/integrations/overview)</Badge>

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](/ai-for-service/flows/create-and-manage-flows#create-a-start-flow).

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/new-start-flow-1.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=b6984fbab441ca7796f5974823fd32d5" alt="New Start Flow" width="2048" height="1154" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/new-start-flow-1.png" />

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

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

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/experience-flow-2.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=9e336c051bab83f7fc2c028fc4c56223" alt="Experience Flow" width="2022" height="1134" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/experience-flow-2.png" />

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.

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/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=HQ7R4xrixi4NQNpE&q=85&s=e25e61852ca87afb0f960859721763b7" alt="Add Node in Experience Flow" width="2048" height="1154" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/add-node-in-experience-flo-3.png" />

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**.

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/integrations-agent-transfer-4.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=bb713dee3e0d94da89fe6677f5ed7b00" alt="Integrations Agent Transfer" width="2048" height="1154" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/integrations-agent-transfer-4.png" />

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. |

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/sip-transfer-5.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=835ea8a63920d11ab339a5e0ca8838e7" alt="SIP Transfer" width="2048" height="1154" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/sip-transfer-5.png" />

<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.</Note>

***

## 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**.

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/admin-architect-6.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=947497b8f1ceda79124ecac9be4eea8d" alt="Admin Architect" width="1910" height="795" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/admin-architect-6.png" />

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

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/add-new-call-flow-7.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=b161e9ba89d3ffa801a0ceb58b243302" alt="Add New Call Flow" width="778" height="552" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/add-new-call-flow-7.png" />

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`

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/store-sip-headers-result-9.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=a1bbba48da00cc4d9136e5bf0e4dfe86" alt="Store SIP Headers Result" width="1289" height="571" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/store-sip-headers-result-9.png" />

   <Note>To find any node in Architect, click the three vertical dots on that node and select **Search Toolbox**.</Note>

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

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

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/assign-value-as-expression-10.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=1d4fbd55f919347cde0720174a3b6d24" alt="Assign Value as Expression" width="1278" height="659" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/assign-value-as-expression-10.png" />

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.</Note>

    <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/sip-headers.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=0df574af9cc688f26409529031959a70" alt="SIP Headers" width="1289" height="770" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/sip-headers.png" />

### 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.</Note>

<img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/did-range-11.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=af12500b06044f0c3cb6a4bd18a776f6" alt="DID Range" width="1853" height="327" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/did-range-11.png" />

* **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.

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/add-new-call-route-13.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=f95c5c1dd50d67e4c416b1b2c9a634c0" alt="Add New Call Route" width="1004" height="421" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/add-new-call-route-13.png" />

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/create-call-route-14.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=322d069afa5ba92f03f2fd59f2336741" alt="Create Call Route" width="1849" height="873" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/create-call-route-14.png" />

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 |

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/create-external-trunk-17.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=1fea76b6b7c8caa35e7efe1874f9d55a" alt="Create External Trunk" width="1084" height="358" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/create-external-trunk-17.png" />

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

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/number-plan-site-list-18.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=a1ad78e6fef9b6ad8802220defaee7ec" alt="Number Plan Site" width="1104" height="716" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/number-plan-site-list-18.png" />

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

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

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/inbound-request-uri-reference-19.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=ae9d760d27c719a06d069515a372b0d1" alt="Inbound Request URI Reference" width="997" height="178" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/inbound-request-uri-reference-19.png" />

   <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.</Note>

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 |

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/sip-access-control-field-20.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=70bdfef3d93df5c3ffec83e67dc05bd7" alt="SIP Access Control" width="980" height="337" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/sip-access-control-field-20.png" />

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

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

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/dual-channel-checkbox-21.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=1f337e4bb65801068896829f2667ff87" alt="Dual Channel" width="1103" height="803" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/dual-channel-checkbox-21.png" />

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

    <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/protocol-conversation-headers-22.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=7e957059620cc86336164c97e9470989" alt="Protocol Conversation Headers" width="1147" height="497" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/protocol-conversation-headers-22.png" />

11. Click **Save External Trunk**.

    <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/save-external-trunk-23.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=16caca033efb9c25300d1d7ba336d6db" alt="Save External Trunk" width="1380" height="802" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/save-external-trunk-23.png" />

<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.
</Note>

***

## Agent AI Integration

### Add the Bot

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

<img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/web-mobile-client-24.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=3e43d4f2b2212d241e9dd8432747fec6" alt="Web Mobile Client" width="2048" height="1154" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/web-mobile-client-24.png" />

### Integrate Agent AI with Genesys

Follow [Agent AI Integration with Genesys Cloud CX](/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                          |

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/genesys-data-table-25.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=4958ce14afedc44d86f0485e51d4b0c3" alt="Genesys Data Table" width="1740" height="867" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/genesys-data-table-25.png" />

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.

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/accept-call-in-genesys-26.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=07d982bd0016d5b82ebb28397521786b" alt="Accept Call in Genesys" width="1791" height="872" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/accept-call-in-genesys-26.png" />

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

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/available-tools-27.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=598b80246c11605c212099ff19743857" alt="Available Tools" width="1794" height="870" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/available-tools-27.png" />

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

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/agent-ai-widget-28.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=e78b28aab95e7d1061d48111c0272dfa" alt="Agent AI Widget" width="1795" height="872" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/agent-ai-widget-28.png" />

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

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/transcript-tab-29.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=1dc2bda3081f18f9d75e5ef6349b4e78" alt="Transcript Tab" width="1718" height="863" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/transcript-tab-29.png" />

***

## View Interaction Details in CCAI

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

   <img src="https://mintcdn.com/koreai-apis/HQ7R4xrixi4NQNpE/ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/interaction-to-view-30.png?fit=max&auto=format&n=HQ7R4xrixi4NQNpE&q=85&s=38e4627b56fb2afb4768e30ecd828e22" alt="Interaction to View" width="2048" height="1154" data-path="ai-for-service/contact-center/integrations/voice-automation-using-sip-invite-protocol/images/interaction-to-view-30.png" />

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.
