> ## Documentation Index
> Fetch the complete documentation index at: https://www.vobiz.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Bolna + Vobiz streaming | Connect your Vobiz account to Bolna

> Connect your Vobiz account to Bolna with your Auth ID and Auth Token. Bolna places and answers calls through the Vobiz API and streams the audio over a WebSocket - no trunk, no code.

This is the recommended way to use Vobiz with Bolna: paste two credentials into Bolna, pick Vobiz on your agent, and Bolna does the rest through the public Vobiz API. For the alternative over SIP, see [SIP trunk](https://www.vobiz.ai/docs/integrations/bolna-sip-trunk.md).

## How it works

Nothing is built on either side. Bolna uses the Vobiz [Make Call API](https://www.vobiz.ai/docs/call/make-call.md), [VobizXML](https://www.vobiz.ai/docs/xml/overview/how-it-works.md) and the [Stream](https://www.vobiz.ai/docs/xml/stream.md) WebSocket protocol.

```text theme={null}
Bolna                                   Vobiz                                Phone
  |-- POST /Account/{auth_id}/Call/ ----->|  from, to, answer_url on api.bolna.ai
  |<-- queued + CallUUID -----------------|
  |                                       |-- rings --------------------------->|
  |<-- POST answer_url -------------------|  "answered - what should I do?"
  |-- VobizXML: <Record/> <Stream> ------>|
  |<== WebSocket to wss://ws.bolna.ai ====|  start, then caller audio (media)
  |== playAudio, checkpoint, clearAudio =>|  agent audio to the caller -------->|
  |-- stop + DELETE /Call/{uuid} -------->|  hang up
```

1. **Outbound:** Bolna calls [Make Call](https://www.vobiz.ai/docs/call/make-call.md) with your Auth ID and Auth Token, the `from` number, the `to` number and an `answer_url` on `api.bolna.ai` that identifies this call. Vobiz validates the credentials, the number and your balance, queues the call and rings the destination.
2. **Inbound:** the caller dials your Vobiz number. Vobiz finds the [voice application](https://www.vobiz.ai/docs/applications.md) Bolna created for that number and fetches its `answer_url` on `api.bolna.ai`.
3. **Answer:** Bolna returns VobizXML with a [`<Record>`](https://www.vobiz.ai/docs/xml/record) (`recordSession="true"`) and a bidirectional [`<Stream>`](https://www.vobiz.ai/docs/xml/stream) pointing at `wss://ws.bolna.ai/...`.
4. **Conversation:** Vobiz opens the WebSocket, sends a `start` event and then the caller's audio as `media` events. Bolna transcribes, runs the agent and sends the agent's voice back as `playAudio` events, with `checkpoint` to track playback and `clearAudio` when the caller interrupts. See [Stream events](https://www.vobiz.ai/docs/xml/stream/stream-events.md).
5. **End:** Bolna sends `stop` and calls [Hang Up](https://www.vobiz.ai/docs/call/hangup-call.md), or the caller hangs up and Vobiz closes the WebSocket. Vobiz then notifies Bolna's recording, stream-status and hangup URLs.

> [!TIP]
>
> **Bolna's call-duration limit becomes `streamTimeout` and `maxLength` in the XML.** A call that ends at exactly the same length every time was ended by that Bolna agent setting, not dropped by Vobiz.

## Prerequisites

* **Vobiz account** with balance and at least one Indian phone number with KYC complete - [Create account](https://console.vobiz.ai/auth/signup) · [Buy a number](https://www.vobiz.ai/docs/buy-a-phone-number.md)
* **Bolna account** with a saved agent - [platform.bolna.ai](https://platform.bolna.ai)
* Your Vobiz **Auth ID** and **Auth Token** (shown on the Console [Dashboard](https://console.vobiz.ai/app/dashboard)) and one active Vobiz number that is not linked to a SIP trunk

## Connect your account

**1. Copy your Vobiz credentials**

In the [Vobiz Console](https://console.vobiz.ai/app/dashboard), the **Dashboard** shows your **Auth ID** (`MA_XXXXXXXX`) and, behind the eye icon, your **Auth Token**. Copy both.

> [!WARNING]
>
> The Auth Token authorises every API call on your account and signs every webhook Vobiz sends. Paste it only into Bolna's connect form, never into a prompt, a ticket or a shared document.

**2. Connect Vobiz in Bolna**

In [Bolna](https://platform.bolna.ai/providers), open **Settings → Integrations**, filter by **Telephony** and click **Connect** on the **Vobiz** card.

The **Connect Vobiz** form has three fields: **Auth ID**, **Auth Token** and **Phone number**, which is any active number on your Vobiz account in E.164 format (`+91XXXXXXXXXX`). Use a number that is not linked to a SIP trunk. Click **Connect Vobiz**.

![Bolna Connect Vobiz form with Auth ID, Auth Token and Phone number fields and a note pointing to the Vobiz Console dashboard](https://mintcdn.com/vobizai/T_7N4lQoLUeIGy8W/images/bolna/bolna-connect-vobiz-form.png?fit=max\&auto=format\&n=T_7N4lQoLUeIGy8W\&q=85\&s=63e0b1be707dc54a184ec876a235b69f)

The Vobiz card now shows **Status: Connected**, and the numbers on your Vobiz account appear under **My Numbers → External**. Nothing to import.

![Bolna Settings, Integrations page filtered to Telephony, with the Vobiz card showing Status Connected next to an unconnected Twilio card](https://mintcdn.com/vobizai/T_7N4lQoLUeIGy8W/images/bolna/bolna-vobiz-connected.png?fit=max\&auto=format\&n=T_7N4lQoLUeIGy8W\&q=85\&s=4876c4e39426c137fb84a761d28706b5)

**3. Set Vobiz as the agent's call provider**

Open your agent in **Agent Studio**, go to the **Calling** tab and pick **Vobiz** under **Telephony Provider**. Click **Save agent**.

![Bolna Agent Studio Calling tab with Vobiz selected as the telephony provider](https://mintcdn.com/vobizai/T_7N4lQoLUeIGy8W/images/bolna/bolna-calling-tab-vobiz.png?fit=max\&auto=format\&n=T_7N4lQoLUeIGy8W\&q=85\&s=9d5944f4675ab6e24daace30e76ae802)

Every outbound call this agent places now comes from your Vobiz number and runs on your Vobiz account.

**4. Place a test call**

From the agent, place a call to a phone you can answer. Answer it and talk to the agent.

The call appears in the Vobiz Console under **Call Logs** with its CDR (duration, hangup cause and quality metrics), and in Bolna's **Call History** with the transcript. Vobiz bills the call at your voice rate; Bolna bills its per-minute agent rate separately.

**5. Answer inbound calls**

In the same **Calling** tab, switch on **Inbound Calling**, open the **Inbound number** dropdown, pick the Vobiz number that should reach this agent and click **Save agent**.

![Bolna Calling tab with the Inbound Calling toggle on and a Vobiz number selected in the Inbound number dropdown](https://mintcdn.com/vobizai/T_7N4lQoLUeIGy8W/images/bolna/bolna-inbound-calling.png?fit=max\&auto=format\&n=T_7N4lQoLUeIGy8W\&q=85\&s=2663d74db4e301f99e427175dceff3f8)

Bolna creates a [voice application](https://www.vobiz.ai/docs/applications.md) on your Vobiz account with its own answer and hangup URLs on `api.bolna.ai`, and attaches the number to it. You can see it in the Vobiz Console under **Voice Applications**; leave its URLs unchanged.

Call the number from any phone. The agent answers.

> [!TIP]
>
> **Streaming is live.** Your Bolna agent places and answers calls on your Vobiz numbers, with call audio streamed between Vobiz and Bolna.

## Buy a Vobiz number inside Bolna (optional)

You can also provision an Indian number without leaving Bolna: **My Numbers → Buy Phone Number**, choose **India** and **Vobiz**, then a region and a number. Indian regulation requires KYC first; Bolna shows a **KYC required for VoBiz numbers** banner with an **Apply for KYC** link until you complete it under **Organisation settings → Vobiz KYC**.

![Bolna Buy phone number dialog with India and Vobiz selected, showing the KYC required banner with an Apply for KYC link and a Subscribe number button](https://mintcdn.com/vobizai/T_7N4lQoLUeIGy8W/images/bolna/bolna-buy-number-vobiz.png?fit=max\&auto=format\&n=T_7N4lQoLUeIGy8W\&q=85\&s=c1edcd137bd69316c61924a3866b560a)

> [!NOTE]
>
> Numbers bought inside Bolna are provisioned and billed by Bolna (USD 5 per month at the time of writing) and managed from Bolna, not from your own Vobiz Console. To keep numbers on your own Vobiz account, buy them in the [Vobiz Console](https://console.vobiz.ai) and connect the account as above.

## Use the Bolna API instead of the dashboard

Set the agent's input and output provider to `vobiz` when you [create the agent](https://www.bolna.ai/docs/api-reference/agent/create), then place calls with Bolna's [`/call` API](https://www.bolna.ai/docs/api-reference/calls/make):

```json agent tools_config theme={null}
"tools_config": {
  "input":  { "provider": "vobiz", "format": "wav" },
  "output": { "provider": "vobiz", "format": "wav" }
}
```

```bash Place a call theme={null}
curl -X POST https://api.bolna.ai/call \
  -H "Authorization: Bearer <bolna_api_key>" \
  -H "Content-Type: application/json" \
  -d '{ "agent_id": "<agent_id>", "recipient_phone_number": "+91XXXXXXXXXX" }'
```

Bolna's provider API uses the keys `VOBIZ_AUTH_ID`, `VOBIZ_AUTH_TOKEN` and `VOBIZ_PHONE_NUMBER` for the connection itself; see [Connect your provider credentials](https://www.bolna.ai/docs/providers).

## Troubleshooting

| Symptom | Cause | Fix |
| - | - | - |
| Bolna shows an authentication error when connecting | Auth ID and Auth Token swapped, or a token copied with a trailing space | Re-copy both from the Console [Dashboard](https://console.vobiz.ai/app/dashboard) and paste them into the matching fields |
| "From number not owned by account" | The number was bought less than about two minutes ago, or sits on a different account or sub-account | Wait two minutes after buying, and connect the account that owns the number |
| Calls fail with `402 Payment Required` | Vobiz balance too low | Top up in the Vobiz Console |
| Every call ends at the same length | Bolna's call-duration limit on the agent (`streamTimeout` and `maxLength` in the XML) | Raise the limit in the agent's settings |
| Inbound calls are not answered | **Inbound Calling** is off, no number is selected, or the number is attached to another application or trunk | Turn the toggle on and pick the number; in the Vobiz Console check the number routes to the application Bolna created |
| The inbound number is picked but nothing happens | The agent was not saved | Click **Save agent**; Bolna creates the application only on save |

## Resources

| Resource | Link |
| - | - |
| Bolna: Using Vobiz | [bolna.ai/docs/vobiz](https://www.bolna.ai/docs/vobiz) |
| Bolna: Connect your Vobiz account | [bolna.ai/docs/vobiz/connect-provider](https://www.bolna.ai/docs/vobiz/connect-provider) |
| Bolna: Inbound calls | [bolna.ai/docs/inbound/receiving-calls](https://www.bolna.ai/docs/inbound/receiving-calls) |
| Vobiz: Stream XML element | [/xml/stream](https://www.vobiz.ai/docs/xml/stream.md) |
| Vobiz: Streaming over WebSockets | [/concepts/streaming-websockets](https://www.vobiz.ai/docs/concepts/streaming-websockets.md) |
| Vobiz: SIP trunk path for Bolna | [/integrations/bolna-sip-trunk](https://www.vobiz.ai/docs/integrations/bolna-sip-trunk.md) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.