---
schema_version: "1"
id: a19858508e64f84da0980d11dcbbf26d6e4e6b8dacc2a5215ab1db4192d23ec0
title: Enable Auto-Hangup for Agentforce Voice
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agentforce_voice_auto_hangup.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agentforce_voice_auto_hangup.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 71c7d7382b071ad46d47a5d9ad0bc15bdaefa96e1cc5a60c10ff4c744cb530cb
description: Set up your voice-enabled agent to end a call automatically when it has fully addressed the caller's request. Enable this behavior per agent with Agentforce Script. If you use partner telephony, also turn on a setting that returns the call to your telephony vendor, and prepare your interactive voice response (IVR) flow to read the disconnect reason and route the returned call.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Enable Auto-Hangup for Agentforce Voice

Set up your voice-enabled agent to end a call automatically when it has fully addressed the caller's request. Enable this behavior per agent with Agentforce Script. If you use partner telephony, also turn on a setting that returns the call to your telephony vendor, and prepare your interactive voice response (IVR) flow to read the disconnect reason and route the returned call.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions with Foundations or Agentforce 1 Editions, and <a href="https://help.salesforce.com/s/articleView?id=service.voice_editions.htm&amp;language=en_US" target="_blank">Salesforce Voice add-ons</a>.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions with Foundations or Agentforce 1 Editions, and <a href="https://help.salesforce.com/s/articleView?id=service.voice_editions.htm&amp;language=en_US" target="_blank">Agentforce Contact Center add-ons</a>.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:left;vertical-align:top;" id="d50867e108">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d50867e108 ">To configure Auto-Hangup and Auto Disconnect:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d50867e108 ">
              <p>Manage Agentforce Service Agents AND Manage AI Agents</p>
              <p>AND Customize
                Application</p>
              <p style="margin-bottom:0;">AND Manage Flows</p>
            </td>

          </tr>
        </tbody>
      </table>

- Your org has Agentforce Voice with Telephony set up and active.
- You created your agent with the new Agentforce Builder, or you migrated it to the new builder.
- For partner telephony: your telephony vendor can query Salesforce using Salesforce REST API.

Agentforce Voice ends a call in three situations: the caller stops responding, the call reaches its maximum duration (60 minutes), or the agent determines that it has fully addressed the caller's request. The first two happen by default. The third happens only when you turn on Auto-Hangup for the agent. Auto-Hangup applies to Agentforce Voice calls through Telephony connections. It doesn't apply to Enhanced Chat v2 (ECv2), which uses its own timeout settings for text and voice modes.

These controls determine when a voice agent ends a call and what happens next:

    
| Setting | Where You Set It | What It Controls | Default | Scope |
| --- | --- | --- | --- | --- |
| **Auto-Hangup** (`auto_hangup`) | Agentforce Script, on the agent's Telephony connection | Whether the agent ends the call when it determines the caller's request is fully addressed (a semantic call end) | Off (`False`) | Per agent, at the connection level |
| **Auto Disconnect** | Agentforce Voice Setup | Whether Salesforce returns the call to your IVR flow, or keeps the call open until the caller hangs up | Off | Org-wide, partner telephony only |
| **Caller stops responding** | Agentforce Script (optional): `speak_up_config` under `additional_configs` | The agent asks "Are you still there?" and ends the call if the caller doesn't respond | On | All voice agents on Telephony connections |
| **Maximum call duration** | Set by Salesforce | The agent ends the call after 60 minutes | On (60 minutes) | All voice agents on Telephony connections |

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_note.png)

Note The two settings use similar names, Auto-Hangup and Auto Disconnect, but they're distinct controls. Auto-Hangup governs the agent's behavior in one scenario: a fully addressed request. Auto Disconnect governs what happens to the call across all agent-ended scenarios when you use partner telephony.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_important.png)

Important The two settings work together on partner telephony. If you set `auto_hangup` to `True` but leave Auto Disconnect off, the agent ends its side of the call, but the call stays connected until the caller hangs up. To end resolved calls cleanly, turn on both.

The first two tasks apply to all Agentforce Voice agents. The last two tasks apply to partner telephony only.

## Enable Auto-Hangup on the Agent with Agentforce Script

Turn on Auto-Hangup for the agent so that it ends the call when it has fully addressed the caller's request. This step applies to all Agentforce Voice agents. Agentforce Contact Center customers start here.

With Agentforce Contact Center, Salesforce owns the call end to end and terminates it directly, whichever of the three situations ended it. You don't need any other setup. The caller-stops-responding and maximum-duration endings are on by default.

1. From the App Launcher, find and open **Agentforce Studio**.
2. Select the agent that you want to configure.
3. Open the Telephony connection for the agent, and then switch to script mode.
    
    ![The Telephony connection in Agentforce Studio switched to script mode.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/agentforce_voice_auto_hangup_script_mode.png)
4. In the telephony code block, set the `auto_hangup` boolean parameter to `True`.
    
    The value is `False` by default. When the value is `False`, the agent doesn't end the call when it determines that the caller's request is fully addressed. When the value is `True`, the agent ends the call when it determines that the caller's request is fully addressed.
    
    ![The auto\_hangup parameter set to True in the telephony code block.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/agentforce_voice_auto_hangup_code_block.png)

The agent ends the call when it determines that the caller's request is fully addressed.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_important.png)

Important For partner telephony, also turn on **Auto Disconnect** ([Turn On Auto Disconnect](https://help.salesforce.com/s/articleView?id=ai.agentforce_voice_auto_hangup.htm&release=264.0.0&type=5 "Turn on the Auto Disconnect setting so that Salesforce returns control of the call to your telephony vendor when the agent ends the call. This step applies to partner telephony.")). Without it, the agent ends its side of the call, but the call stays connected until the caller hangs up.

## Customize the Prompts for a Caller Who Stops Responding

Change the message and wait times that the agent uses before it ends a call with a caller who stops responding. This step is optional.

When a caller stops responding, the agent asks "Are you still there?", and then ends its side of the call after the caller doesn't respond to three prompts. This behavior is on by default. With the default values, the agent ends the call after about 75 seconds of silence. If the caller says anything, the count of prompts resets.

In your agent's [voice modality code block](https://developer.salesforce.com/docs/ai/agentforce/guide/ascript-blocks.html#modality-block), change the values in the `speak_up_config` block under `additional_configs`.

- `speak_up_first_wait_time_ms`: How long to wait after the caller's last utterance before the first prompt. Default: 15,000 ms.
- `speak_up_follow_up_wait_time_ms`: How long to wait before each later prompt, and before the agent ends the call after the third prompt. Each wait is measured from when the previous prompt starts. Default: 20,000 ms.
- `speak_up_message`: What the agent says. The agent uses this message for all three prompts. You can't change the number of prompts. If you don't set it, the agent uses a default message in the caller's language.

## Configure Your IVR to Read the Disconnect Reason

Configure your IVR to read the disconnect reason on the VoiceCall record and route the call accordingly when control of the call returns to your vendor. This step applies to partner telephony.

Configure your IVR to call Salesforce REST API, read the `DisconnectReason` field on the VoiceCall record, and route accordingly when control of the call returns to your vendor.

First set up your telephony system to resume the call after the agent disconnects, as described in [Configure Call Escalation in the Telephony System](https://help.salesforce.com/s/articleView?id=ai.telephony_configure_call_escalation.htm&type=5&language=en_US). Then, before the step that transfers the resumed call to a rep, add a query for the disconnect reason so that your IVR releases clean disconnects instead of escalating them.

Configure your IVR to route based on the disconnect reason.

- **Bot Terminated, Customer Intent Fulfilled, Customer Unresponsive, or Maximum Duration Reached:** The agent ended the call. Bot Terminated means that the agent terminated the session. Terminate the call with a terminate or end-call node in your IVR flow, or play a closing message.
- **Any other value:** Route the call to a customer service rep queue, for example when the caller hung up, the call was transferred, or a system error occurred.

For a full list of disconnect reasons, see the [VoiceCall](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_voicecall.htm) and [VoiceCallSessionData](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_voicecallsessiondata.htm) reference pages.

The specific steps depend on your IVR platform. Refer to your IVR vendor's documentation for Salesforce REST API integration.

## Turn On Auto Disconnect

Turn on the **Auto Disconnect** setting so that Salesforce returns control of the call to your telephony vendor when the agent ends the call. This step applies to partner telephony.

On partner telephony, Salesforce can't terminate the call directly. Before you turn on Auto Disconnect, prepare your IVR so that your vendor can route the returned call correctly ([Configure Your IVR to Read the Disconnect Reason](https://help.salesforce.com/s/articleView?id=ai.agentforce_voice_auto_hangup.htm&release=264.0.0&type=5 "Configure your IVR to read the disconnect reason on the VoiceCall record and route the call accordingly when control of the call returns to your vendor. This step applies to partner telephony.")).

When **Auto Disconnect** is on, Salesforce returns control of the call to your telephony vendor whenever the agent ends the call, whether the agent addressed the caller's request, the caller stopped responding, or the call reached its maximum duration. Your vendor then reads the VoiceCall record to route or release the call. When the setting is off, the call stays connected and waits for the caller to hang up. This setting is off by default and applies org-wide to all partner telephony connections. It doesn't affect Agentforce Contact Center.

1. From Setup, in the Quick Find box, enter Agentforce Voice, and then select **Agentforce Voice Setup**.
    
    For more information about this page, see [Launch Agentforce Voice Setup](https://help.salesforce.com/s/articleView?id=ai.agent_agentforce_voice_setup.htm&release=264.0.0&type=5 "Agentforce Voice Setup walks you through the entire setup process.").
2. Turn on **Auto Disconnect**.
    
    ![The Auto Disconnect setting in Agentforce Voice Setup.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/agentforce-voice-setup-autodisconnect.png)

When the agent ends a call, Salesforce returns control of the call to your telephony vendor.