1. Tasks
  2. Voice Hangup

Tasks

Voice Hangup

Ends a live voice call once the assistant has finished speaking. Useful for ending the call after the stub's work is done, optionally with a goodbye.

The assistant finishes what it is saying before the call ends. If content is given, the assistant is asked to act on it first, eg to say goodbye. The call then ends once the assistant has been quiet for a moment, or after 15 seconds at most.

If the caller hasn't joined yet, the call ends straight away.

The task returns as soon as the hangup is accepted, not when the call has ended. The stub gets a final _update_from_voice with event: "session_ended" and reason: "stub_hangup" once it has.

The same command is available as a hangup voice notification.

Basic usage

loading...

Parameters

content
optional
string

Instructions for the assistant before the call ends, eg "Say goodbye briefly."


voice_session_uuid
optional
string

The voice call to send the command to. It must belong to this stub.

Default: the stub's live voice call

Result

loading...

Properties

payload.voice_session_uuid
string

The voice call the command was sent to.

Errors

message Meaning
no_active_voice_session The stub has no live voice call, or voice_session_uuid doesn't belong to this stub
voice_session_not_active The call is already ending

Examples

Say goodbye, then hang up

loading...