Play audio on a live call
play_audioPlays one to five pre-recorded .mp3 or .wav files into a live voice call in order, with optional looping, length cutoff, and mix-over or replace behavior.
Instructions
Play one to five audio files (https .mp3/.wav, in order) into a LIVE call (POST /Call/{uuid}/Play/). Use it for pre-recorded audio; for spoken text use speak_text, and to send the call's audio to your own WebSocket server use start_audio_stream. mix: true (default) plays over the conversation so the parties keep hearing each other; false replaces the leg's audio until playback ends. Playback ends when the files finish, after length seconds, or with stop_audio (stop_speaking and stop_recording do not affect it); with loop it repeats until stopped. A call that is not live fails with call_not_active.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mix | No | true (default): play over the conversation; false: replace the leg's audio while playing. | |
| legs | No | Which call leg the action applies to: aleg (the call's first leg, default), bleg (the leg bridged to it by <Dial>) or both. | |
| loop | No | Repeat the files until stop_audio or `length` ends playback (default false). | |
| urls | Yes | One to five https URLs of .mp3 or .wav files, played in this order. | |
| length | No | Stop playback after this many seconds (1-3600). Omit to play to the end. | |
| call_uuid | Yes | UUID of the LIVE call to act on: the request_uuid returned by make_call, or a UUID from list_live_calls. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | True on success. On a failure the result is isError with ok: false plus `error` (kind), `message`, `retryable` and sometimes `http_status`. | |
| playing | No | True once Vobiz accepted the playback request; audio starts within moments. | |
| call_uuid | No | The call UUID the action was applied to, echoed from the request. | |
| http_status | No | HTTP status Vobiz answered with: 202 when an action was accepted, 204 when one was stopped. | |
| backend_message | No | Vobiz's own confirmation text for the request, or null when it sent none. |