Start an audio stream on a live call
start_audio_streamFork a live Vobiz call's audio to your WebSocket server in near real time for transcription or AI voice agents. Returns a stream_id to manage the stream.
Instructions
Fork the audio of a LIVE Vobiz call to your WebSocket server in near real time (POST /Call/{uuid}/Stream/), for example for live transcription or an AI voice agent. service_url must be wss:// on an approved host. bidirectional: true lets your server play audio back into the call and requires audio_track inbound (the default when bidirectional). content_type sets the inbound audio format (L16 8 kHz default, L16 16 kHz, or mu-law 8 kHz). Returns a stream_id for get_audio_stream / stop_audio_stream. This sends live call audio to an external server, so it requires confirm: true after the user approves the destination. Fails with call_not_active once the call has ended. To play audio into the call without a socket use play_audio; to see streams already running use list_audio_streams.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | Yes | Must be true, set only after the user explicitly approved: sending this call's live audio to this WebSocket server. If your client supports MCP elicitation, the server asks the user to approve directly and this flag is not relied on; otherwise it is your attestation that the user approved. | |
| call_uuid | Yes | UUID of the live call to fork: the request_uuid returned by make_call, or call_uuid from list_live_calls. | |
| audio_track | No | Which audio to fork. Default both; must be inbound when bidirectional is true. | |
| service_url | Yes | wss:// URL of your WebSocket server. Its host must be on the server's VOBIZ_ALLOWED_URL_HOSTS allowlist (or be a public host when any host is allowed). | |
| content_type | No | Inbound audio format sent to your server. Default audio/x-l16;rate=8000. | |
| bidirectional | No | Allow your server to send audio back into the call (playAudio). Default false. | |
| extra_headers | No | Comma-separated header:value pairs (e.g. X-Session:abc123) passed with the stream. Use the wss:// URL path, not these headers, to authenticate the socket. | |
| stream_timeout | No | Stop the stream automatically after this many seconds. Default 86400. | |
| status_callback_url | No | https URL (approved host) that receives stream status events (StartStream, PlayedStream, StopStream...). | |
| status_callback_method | No | HTTP method for status_callback_url (default POST). Ignored without status_callback_url. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | true on success; false (with error and message) when the tool failed. | |
| call_uuid | No | The call whose audio is being forked. | |
| stream_id | No | ID of the new stream for get_audio_stream and stop_audio_stream, or null if Vobiz did not return one. | |
| streaming | No | true once the stream is running. | |
| audio_track | No | Which side is forked: inbound, outbound or both. | |
| http_status | No | HTTP status Vobiz answered with. | |
| bidirectional | No | Whether your server may send audio back into the call. | |
| backend_message | No | Message from Vobiz about the operation, or null. |