Automatic leaving behavior

Control when your bot should automatically leave calls.

There are certain scenarios where you might want your bot to automatically leave calls.

Some of these include:

  1. When a bot is stuck in a waiting room
  2. When everyone leaves the call
  3. When a bot is in a call but not recording.
📘

The automatic_leave setting ensures the bot waits the configured number of seconds before initiating the leave process. The time taken for the bot to fully exit the call can add a few additional seconds, (up to 11 seconds in rare cases).

Default timeout values

To control the behavior of bots leaving calls, you can configure the automatic_leave object when calling Create Bot.

Recall automatically sets sensible defaults when a parameter isn't provided. The defaults (in seconds) for are as follows:

{
  "automatic_leave": {
    "waiting_room_timeout": 1200,
    "noone_joined_timeout": 1200,
    "everyone_left_timeout": {
      "timeout": 2,
      "activate_after": null
    },
    "in_call_not_recording_timeout": 3600,
    "recording_permission_denied_timeout": 30,
    "silence_detection": {
      "timeout": 3600,
      "activate_after": 1200
    },
    "bot_detection": {
      "using_participant_events": {
        "timeout": 600,
        "activate_after": 1200
      },
      "using_participant_names": {
        "timeout": 600,
        "activate_after": 120,
        "matches": [
          "notetaker",
          "recorder",
          "assistant"
        ]
      }
    }
  }
}

Participant timeouts

Silence Detection Timeout

Silence detection lets a bot leave after a period of continuous silence. Configure it in automatic_leave.silence_detection.

  • timeout sets how long the call must stay silent before the bot leaves. Audio resets the countdown.
  • activate_after sets how long the bot waits before checking for silence. Use this buffer to account for meetings that start late.

For a faster exit, start with a timeout of 5–10 minutes. Use 10–20 minutes if brief pauses or quiet breaks could otherwise cause the bot to leave too early. See Default timeout values for the defaults.

Everyone Left Timeout

This setting controls how quickly the bot leaves when the bot is the only participant left in the call. The bot uses two parameters:

  • automatic_leave.everyone_left_timeout.timeout
    • Defines how long (in seconds) the bot will wait after it detects that it’s alone before leaving. Default: 2s.
    • After the bot sees that all other participants have left, it starts this timer. If no one else is back in the call when the timer ends, the stops recording and leaves.
  • automatic_leave.everyone_left_timeout.activate_after
    • The number of seconds after recording starts before the bot begins checking whether everyone else has left. This is measured from recording start, not when the bot joins the meeting.
    • Defaults to null, which removes the recording-start requirement. If you provide a numeric value and no recording is configured (recording_config: null), this check will never activate.
    • This can prevent false positives early in the call (for example, people joining and dropping in the first few minutes). Before this threshold, the bot will not auto-leave just because it’s briefly alone.

The bot must detect at least 1 participant in the call before this timeout is enabled. If the bot joins a call and there's no participant in the call, the bot will not start this timeout until a participant joins the call. The other timeouts still apply.

With the default 2s timeout, if everyone briefly leaves and then rejoins, the bot will likely leave before they’re re-admitted. Increasing the timeout makes the bot more tolerant for cases where the participant joins then leaves temporarily, but you’ll also get more silence at the end of the recording because the bot will sit in an empty call longer before hanging up.

No-one Joined Timeout

This setting controls how quickly the bot leaves when the bot is the only participant that has joined the call. This is common in cases where the bot joins a meeting without a waiting room but no other participants ever joins. (Default: 1200 (20 minutes))

Waiting room timeout

You can use the automatic_leave.waiting_room_timeout parameter to customize the timeout of bots in waiting rooms.

For timeouts triggered by the automatic_leave.waiting_room_timeout parameter, the bot status change will contain a timeout_exceeded_waiting_room sub code.

The default value is 20 minutes (1200 seconds).

Platform default timeouts

Unlike other meeting platforms, Microsoft Teams has a platform-enforced waiting room timeout of 30 minutes.

If a bot times out due to platform-enforced waiting room timeout, the bot status change will contain a call_ended_by_platform_waiting_room_timeout sub code.

Since this is enforced by Teams, this timeout will occur regardless of whether you set your bot's automatic_leave.waiting_room_timeout to a value longer than this.

For example, if you configure this value to 35 minutes, a Microsoft Teams bot will still timeout after 30 minutes of being in the waiting room.

📘

Disabled waiting rooms

The other thing to keep in mind is that for some platforms, hosts can disable waiting rooms.

Think about the bot just like a normal participant. If there's a waiting room enabled, then it will go into the waiting room with other participants.

If there is no waiting room enabled, then it will skip the waiting room and join the meeting directly, just like other participants.

Platform Waiting Rooms

PlatformDefault TimeoutCan disable?
Google MeetIndefinite✅
Microsoft Teams30 minutes❌
ZoomIndefinite✅

Recording Timeouts

In Call Not Recording Timeout

You may want to set a maximum limit on the amount of time that a bot can be in a call while not recording (e.g. waiting for the host/participants to grant recording consent).

You can do this using the automatic_leave.in_call_not_recording_timeout parameter. This will allow you to specify the maximum number of seconds that the bot can be in the call while not recording before it leaves automatically. (Default: 3600 (60 minutes))

In Call Recording Timeout

You may want to set a maximum limit on the amount of time that a bot can be recording in a call (e.g. limiting free accounts to 30 minutes of recording per meeting).

You can do this using the automatic_leave.in_call_recording_timeout parameter. This will allow you to specify the maximum number of seconds that the bot can be in the call recording before it leaves automatically.

Recording Permission Denied Timeout

A bot can request for recording permissions and have the request denied by the host/co-host in 2 ways:

  • A host/co-host explicitly denies the request via the recording consent prompt shown to the host
  • A host/co-host doesn't respond to the recording consent prompt (e.g. they didn't see the request) and the request is automatically denied after 60s

When the bot's request to record is denied, the bot will enter the recording_permission_denied state. The recording permission denied timeout defines how long the bot will stay after having it's recording consent automatically denied. (Default: 30 seconds)

Bot Detection Timeouts

See Detecting Other Bots & Automatically Leaving for participant-name and participant-event examples and tuning guidance.

Behavior when recording is paused or stopped

Pausing recording

Most automatic_leave timers pause when recording pauses and resume from where they left off. The everyone_left_timeout and in_call_not_recording_timeout timers continue running.

Stopping recording

When recording stops, silence detection is suspended because there is no active audio stream to analyze. The other automatic_leave timers continue running.


Did this page help you?