Skip to main content

Call Duration & Background Audio

Two per-agent settings that shape the call’s outer envelope: a maximum call duration (graceful auto-end with farewell) and an ambient background audio track (mixed under the bot’s TTS for the duration of the call). Both are independent of each other and independent of the core agent prompt / voice / KB configuration.

Call duration cap

A hard cap on how long any single call can run. When the limit is reached, the bot speaks a farewell and ends the session through the standard end-of-call path so transcript, recording, billing and the session.completed webhook all fire normally.

Default

New agents default to max_call_duration_secs = 600 (10 minutes). You can override this between 60 and 3600 seconds (1 minute to 1 hour) per agent, or set it to null to disable the cap entirely. Existing agents created before this default landed may still hold null; opt them in by writing 600 via the agent update endpoint.

Behavior at the cap

The cap fires in two stages so the wind-down sounds natural:

Setting the cap

Set to null to disable:

Background audio

Ambient audio mixed under the bot’s TTS for the duration of the call (office chatter, café noise, white noise, etc.). Looped continuously, volume tunable per agent. Vocobase handles playback and format normalization automatically.

Asset model

Two visibility tiers:
  • Platform-curated (is_platform: true) — visible to every account.
  • Your own uploads (owner_user_id: <yours>) — visible only to your account.
List both in one call:
Response:

Uploading your own asset

Bytes go directly to a presigned upload URL. Vocobase then converts the file into the exact shape the bot needs and marks the asset ready. Accepted formats: wav, mp3, m4a, aac, ogg, opus, flac, webm, aiff. Constraints (enforced server-side):
  • Size: ≤ 5 MB.
  • Duration: ≤ 5 minutes (loops anyway). An over-length file is never quietly accepted — it either fails at finalize or, if its container declared no length for the check to read, ends up FAILED with the reason in error_message.
Channels and sample rate are not constraints. Stereo is downmixed and the audio is resampled for you — you do not need to know, or match, the rate the call runs at.
Compressed formats go further inside the 5 MB ceiling than WAV does. A one-minute bed is roughly 235 KB as a 32 kbps MP3 against roughly 937 KB as an 8 kHz WAV, so uploading MP3 rather than WAV buys you about four times the length.
finalize returns UPLOADING, not READY. Conversion runs after it responds, and an asset cannot be attached to an agent until it is READY — GET /agent/background-audio lists only READY assets, so a client that attaches immediately after finalize will not find it.Poll GET /agent/background-audio/{id}/status until status leaves UPLOADING. A FAILED status carries the reason in error_message.A 5 MB upload converts in seconds, but status polls count against the same 60 requests/minute limit as every other /api/v2 endpoint — poll once a second and you will spend your whole budget on the upload and start getting 429 on your call starts. Poll every 2-3 seconds, and back off on 429 using Retry-After. Give up after 60 seconds: an asset still UPLOADING by then is not going to finish, so surface it to the user as a failed upload and have them re-upload rather than polling on.An undecodable file still fails at finalize, immediately, with a specific error — so you get fast feedback on a genuinely bad upload.

Attaching to an agent

background_audio_volume is 0.0-1.0. When null, the bot applies a default of 0.3.

Removing background audio from an agent

Deleting an asset you uploaded

Soft-deletes the asset. Any agents currently referencing it are automatically detached (background_audio_id cleared).