Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions fern/apis/api/openapi-overrides.yml
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,14 @@ components:
Configuration used to create an assistant, including its model, voice,
transcriber, prompts, tools, messaging, and conversation behavior.
properties:
endCallMessage:
description: >-
The message the assistant says when it ends the call with the Hang Up
tool (`endCall`) and that tool has no messages. If the tool has a
`request-start` message, the assistant says that message instead. If
this field is unspecified or empty, the assistant says "Goodbye" in the
transcriber's language. When an assistant hook runs `endCall`, this
field isn't used and the assistant says "Goodbye" in English.
firstMessageInterruptionsEnabled:
description: >-
Set to `true` to allow the user to interrupt the assistant while it
Expand All @@ -653,6 +661,14 @@ components:
Per-call or handoff overrides for an assistant's providers, messages,
tools, credentials, call behavior, and server configuration.
properties:
endCallMessage:
description: >-
The message the assistant says when it ends the call with the Hang Up
tool (`endCall`) and that tool has no messages. If the tool has a
`request-start` message, the assistant says that message instead. If
this field is unspecified or empty, the assistant says "Goodbye" in the
transcriber's language. When an assistant hook runs `endCall`, this
field isn't used and the assistant says "Goodbye" in English.
firstMessageInterruptionsEnabled:
description: >-
Set to `true` to allow the user to interrupt the assistant while it
Expand All @@ -678,6 +694,14 @@ components:
how the assistant listens, reasons, speaks, handles conversations,
sends events, and produces artifacts and analysis.
properties:
endCallMessage:
description: >-
The message the assistant says when it ends the call with the Hang Up
tool (`endCall`) and that tool has no messages. If the tool has a
`request-start` message, the assistant says that message instead. If
this field is unspecified or empty, the assistant says "Goodbye" in the
transcriber's language. When an assistant hook runs `endCall`, this
field isn't used and the assistant says "Goodbye" in English.
firstMessageInterruptionsEnabled:
description: >-
Set to `true` to allow the user to interrupt the assistant while it
Expand All @@ -700,6 +724,14 @@ components:
Fields used to update an existing assistant. Include only the settings
you want to change; omitted fields retain their current values.
properties:
endCallMessage:
description: >-
The message the assistant says when it ends the call with the Hang Up
tool (`endCall`) and that tool has no messages. If the tool has a
`request-start` message, the assistant says that message instead. If
this field is unspecified or empty, the assistant says "Goodbye" in the
transcriber's language. When an assistant hook runs `endCall`, this
field isn't used and the assistant says "Goodbye" in English.
firstMessageInterruptionsEnabled:
description: >-
Set to `true` to allow the user to interrupt the assistant while it
Expand All @@ -717,6 +749,46 @@ components:
x-fern-enum:
"transcript[transcriptType='final']":
name: FinalTranscript
AssistantDraft:
properties:
endCallMessage:
description: >-
The message the assistant says when it ends the call with the Hang Up
tool (`endCall`) and that tool has no messages. If the tool has a
`request-start` message, the assistant says that message instead. If
this field is unspecified or empty, the assistant says "Goodbye" in the
transcriber's language. When an assistant hook runs `endCall`, this
field isn't used and the assistant says "Goodbye" in English.
AssistantVersion:
properties:
endCallMessage:
description: >-
The message the assistant says when it ends the call with the Hang Up
tool (`endCall`) and that tool has no messages. If the tool has a
`request-start` message, the assistant says that message instead. If
this field is unspecified or empty, the assistant says "Goodbye" in the
transcriber's language. When an assistant hook runs `endCall`, this
field isn't used and the assistant says "Goodbye" in English.
CreateAssistantDraftDTO:
properties:
endCallMessage:
description: >-
The message the assistant says when it ends the call with the Hang Up
tool (`endCall`) and that tool has no messages. If the tool has a
`request-start` message, the assistant says that message instead. If
this field is unspecified or empty, the assistant says "Goodbye" in the
transcriber's language. When an assistant hook runs `endCall`, this
field isn't used and the assistant says "Goodbye" in English.
UpdateAssistantDraftDTO:
properties:
endCallMessage:
description: >-
The message the assistant says when it ends the call with the Hang Up
tool (`endCall`) and that tool has no messages. If the tool has a
`request-start` message, the assistant says that message instead. If
this field is unspecified or empty, the assistant says "Goodbye" in the
transcriber's language. When an assistant hook runs `endCall`, this
field isn't used and the assistant says "Goodbye" in English.
CreateSquadDTO:
description: >-
Configuration used to create a squad. Provide an ordered list of
Expand Down
15 changes: 12 additions & 3 deletions fern/assistants/end-call-phrases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ description: End call phrases let assistants end calls after saying configured t

End call phrases are configured phrases that end a call after the assistant says them. A customer can initiate the closing exchange by saying goodbye, but the customer's words do not trigger the match directly. The assistant must respond with a configured phrase, such as "have a good day."

<Info>
To let the model decide when to end the call instead, use the [Hang Up tool](/tools/hang-up). For the differences between end call phrases and the Hang Up tool, see [Compare the Hang Up tool and end call phrases](/tools/hang-up#compare-the-hang-up-tool-and-end-call-phrases).
</Info>

The typical sequence is:

1. The customer indicates that the conversation is over.
Expand All @@ -29,7 +33,11 @@ Avoid unnecessary punctuation and whitespace inside a phrase. A short phrase suc
</Step>

<Step title="Find the end call settings">
In the assistant editor, find **End Call Message** and **End Call Phrases**.
In the assistant editor, open the **Advanced** tab and find **End Call Message** and **End Call Phrases**.

<Frame caption="End Call Message and End Call Phrases in the Advanced tab">
<img src="/static/images/tools/hang-up/06-end-call-phrases.png" alt="Vapi Dashboard Advanced tab with End Call Message set to Goodbye and End Call Phrases set to Thanks for calling. Goodbye." />
</Frame>
</Step>

<Step title="Enter end call phrases">
Expand Down Expand Up @@ -69,14 +77,14 @@ Use phrases that are specific to the end of a conversation. Test each phrase aga
| `done` | `we are all done for today` | The longer phrase describes a clear conclusion. |
| `thanks` | `thank you for calling` | The specific phrase is less likely to match a routine acknowledgment. |

## Compare end call phrases and the End Call Tool
## Compare end call phrases and the Hang Up tool

Both options let an assistant end a call, but they support different decision patterns.

| Option | Use when |
| --- | --- |
| End call phrases | The assistant uses simple, predictable spoken conclusions. |
| [End Call Tool](/tools/default-tools#end-call) | The model must decide when to end the call using conversation context or more complex conditions. |
| [Hang Up tool](/tools/hang-up) | The model must decide when to end the call using conversation context or more complex conditions. |

## Troubleshoot unexpected call endings

Expand All @@ -91,6 +99,7 @@ See [call end reasons](/calls/call-ended-reason) for the complete list of ended

## Related

- [Hang Up tool](/tools/hang-up)
- [Built-in tools](/tools/default-tools)
- [Call end reasons](/calls/call-ended-reason)
- [Troubleshoot call errors](/calls/troubleshoot-call-errors)
2 changes: 1 addition & 1 deletion fern/calls/call-ended-reason.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ These occur before the call connects, during resource setup.

These indicate the assistant intentionally ended the call — not errors.

- `assistant-ended-call` — The assistant ended the call (via an end-call tool or function).
- `assistant-ended-call` — The assistant ended the call (via the [Hang Up tool](/tools/hang-up) or function).
- `assistant-ended-call-after-message-spoken` — The assistant ended the call after speaking its final message.
- `assistant-ended-call-with-hangup-task` — The assistant ended the call using a hangup task.
- `assistant-said-end-call-phrase` — The assistant said a phrase configured to trigger call termination.
Expand Down
8 changes: 8 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,14 @@ navigation:
path: tools/transfer-call/warm-transfer.mdx
- page: Assistant-based warm transfer
path: calls/assistant-based-warm-transfer.mdx
- section: Hang Up tool
path: tools/hang-up.mdx
icon: fa-light fa-phone-hangup
contents:
- page: Hang Up tool quickstart
path: tools/hang-up/quickstart.mdx
- page: Configure the Hang Up tool
path: tools/hang-up/configuration.mdx
- section: Handoff tool
path: squads/handoff.mdx
icon: fa-light fa-hand-holding-hand
Expand Down
2 changes: 1 addition & 1 deletion fern/gpt-live/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ For you, more of the design lives in the two prompts:
Vapi connects GPT-Live to your phone numbers and tools, and provides call records and observability according to your recording and data settings:

- Browser, Twilio, Vapi SIP, and WebSocket calls.
- Function, API request, and MCP tools, Google Calendar, Google Sheets, and Slack tools, plus built-in end-call, transfer, and DTMF tools.
- Function, API request, and MCP tools, Google Calendar, Google Sheets, and Slack tools, plus built-in Hang Up, transfer, and DTMF tools.
- Speaker and reasoner prompts, reasoner skills, personality packs, and 22 voices.
- Idle-message hooks and HTTP live call control.
- Transcripts, recordings, structured outputs, scorecards, Boards, Monitoring, and Voice Simulations.
Expand Down
4 changes: 2 additions & 2 deletions fern/gpt-live/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ In **Reasoner**, enter:
Call endCall when the caller asks to end the call or says goodbye.
```
</Step>
<Step title="Add the end-call tool">
Add the built-in **End Call** tool to the assistant.
<Step title="Add the Hang Up tool">
Add the built-in **Hang Up** tool to the assistant.
</Step>
<Step title="Set the greeting and publish">
Set the first message to "Hi, this is Example Service Studio. Who am I speaking with?" and set the assistant to speak first. Select **Publish**.
Expand Down
2 changes: 1 addition & 1 deletion fern/prompting-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ The LLM's ability to use tools correctly depends entirely on how well you descri
}
```

Always set an explicit `description` on transfer and end-call tools. If you leave them blank, the auto-generated description may bias the model against calling them. See [Built-in tools](/tools/default-tools) for details on transfer and end-call tools.
Always set an explicit `description` on Transfer Call and Hang Up tools. If you leave them blank, the auto-generated description may bias the model against calling them. See [Transfer Call tool](/tools/transfer-call) and [Hang Up tool](/tools/hang-up) for details.

Keep tool responses short and structured. Anything you return is visible to the LLM on the next turn — don't include fields the model doesn't need, and never return sensitive values you don't want in conversation history.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 6 additions & 24 deletions fern/tools/default-tools.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Built-in tools
subtitle: 'Adding Transfer Call, End Call, Dial Keypad, and API Request capabilities to your assistants'
subtitle: 'Adding Transfer Call, Hang Up, Dial Keypad, and API Request capabilities to your assistants'
slug: tools/default-tools
description: Add Vapi's built-in default tools to assistants, including transfer call, end call, SMS, DTMF keypad, and API request, through the API or dashboard.
description: Add Vapi's built-in default tools to assistants, including transfer call, hang up, SMS, DTMF keypad, and API request, through the API or dashboard.
---

Vapi voice assistants are given additional functions: `transferCall`, `endCall`, `sms`, `dtmf` (to dial a keypad with [DTMF](https://en.wikipedia.org/wiki/DTMF)), and `apiRequest`. These functions can be used to transfer calls, hang up calls, send SMS messages, enter digits on the keypad, and integrate business logic with your existing APIs.
Expand All @@ -17,29 +17,11 @@ To add built-in tools to your agent, you need to add them in the `tools` array o
Create a transfer call tool, configure its destinations, and choose a transfer mode.
</Card>

#### End Call
#### Hang Up

This function is provided when `endCall` is included in the assistant's list of available tools (see configuration options [here](/api-reference/assistants/create#request.body.model.openai.tools.endCall)). The assistant can use this function to end the call.

```json
{
"model": {
"provider": "openai",
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "You are an assistant at a law firm. If the user is being mean, use the endCall function."
}
],
"tools": [
{
"type": "endCall"
}
]
}
}
```
<Card title="Hang Up tool" icon="fa-light fa-phone-hangup" href="/tools/hang-up">
Let the assistant end the call, set its goodbye message, and guard against calls that end too early.
</Card>

#### Send Text

Expand Down
Loading
Loading