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
24 changes: 24 additions & 0 deletions fern/calls/call-features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,30 @@ curl -X POST 'https://aws-us-west-2-production1-phone-call-websocket.vapi.ai/742
}'
```

### 6. Handoff Call
Handoff the call to a different assistant.

```bash
curl -X POST 'https://aws-us-west-2-production1-phone-call-websocket.vapi.ai/7420f27a-30fd-4f49-a995-5549ae7cc00d/control'
-H 'content-type: application/json'
--data-raw '{
"type": "handoff",
"destination": {
"type": "assistant",
"contextEngineeringPlan": "none",
"assistant": {
"name": "new_assistant",
"voice": {
"provider": "vapi",
"voiceId": "Neha"
},
}
},
"content": "Handing off your call now"
}'
```


## Call Listen Feature

The `listenUrl` allows you to connect to a WebSocket and stream the audio data in real-time. You can either process the audio directly or save the binary data to analyze or replay later.
Expand Down
7 changes: 7 additions & 0 deletions fern/tools/handoff.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,13 @@ destination: {
},
```

If the handoff should not executed, either respond with an empty destination, or provide a custom error. The custom error will be added to the message history.
```json
{
error: "Example custom error message"
}
````

### 3.2 Dynamic Handoff with Custom Parameters

Pass additional context to your webhook for intelligent routing:
Expand Down
Loading