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

# Vobiz SIP Integration

> This page describes everything about Vobiz SIP Integration

## Vobiz SIP Integration Guide — QCall SIP Dialer (Inbound + Outbound)

This guide walks a customer through connecting a **Vobiz SIP trunk** to QCall so their
AI agent can place **outbound** calls and receive **inbound** calls on a real phone number.

It has two halves:

* **Part A — Vobiz side:** buy a number, create a trunk, generate SIP credentials, and get the
  values QCall needs.
* **Part B — QCall side:** add the SIP Dialer in the QCall dashboard, then finish the inbound
  loop-back on Vobiz.

> **You need one thing from each side.** Vobiz gives you a *SIP domain + username + password + phone
> number*. QCall gives you back a *LiveKit SIP URI* that Vobiz must forward inbound calls to. That
> two-way handshake is the whole integration.

***

## How it works (architecture)

```
                         ┌─────────────────────────────────────────────┐
                         │                  QCall                        │
                         │  (LiveKit SIP trunks + AI agent backend)      │
                         └─────────────────────────────────────────────┘
   OUTBOUND  ─────────────────────────────►
   AI agent dials a lead:                       LiveKit Outbound Trunk
   QCall → Vobiz SIP domain (termination) ────► sends INVITE to
   authenticated with username/password         {trunk}.sip.vobiz.ai ──► PSTN ──► Lead's phone

   INBOUND   ◄─────────────────────────────
   Caller dials your Vobiz DID number ──► Vobiz ──► routes (origination URI) to
   your QCall LiveKit SIP URI  ────────────────► LiveKit Inbound Trunk (matches the number)
                                                 ──► Dispatch Rule ──► AI agent answers
```

* **Outbound = QCall → Vobiz.** From QCall's point of view, Vobiz is where the call *terminates*
  into the phone network. That is why QCall calls it the **SIP Termination URI**.
* **Inbound = Vobiz → QCall.** Vobiz must be told to *originate* the incoming call toward QCall's
  LiveKit SIP address.

***

## Credential cheat-sheet (Vobiz → QCall field mapping)

Fill this in as you go through Part A. You'll paste the right-hand column into the QCall dashboard
in Part B.

| What you get from Vobiz          | Example value               | QCall dashboard field   |
| -------------------------------- | --------------------------- | ----------------------- |
| Trunk **SIP domain**             | `abc123.sip.vobiz.ai`       | **SIP Termination URI** |
| Trunk **credential username**    | `qcall_prod`                | **SIP Username**        |
| Trunk **credential password**    | `••••••••••••` (shown once) | **SIP Password**        |
| Purchased **DID / phone number** | `+919876543210`             | **Phone Number**        |
| *(any label you like)*           | `My Vobiz Line`             | **Dialer Name**         |

Then, after saving in QCall, you receive **one** value to bring *back* to Vobiz:

| What QCall gives you     | Example value                   | Where it goes in Vobiz                          |
| ------------------------ | ------------------------------- | ----------------------------------------------- |
| Your **LiveKit SIP URI** | `myproj-x1y2.sip.livekit.cloud` | Inbound trunk **destination / origination URI** |

***

# Part A — Vobiz: get your SIP credentials & number

## Step 1 — Create your Vobiz account

1. Register at **[https://console.vobiz.ai](https://console.vobiz.ai)** (new accounts get free trial credit).
2. After login, open the dashboard. Note your account-level **Auth ID** and **Auth Token** — these
   authenticate any Vobiz API calls. (You don't paste these into QCall; they're only for managing
   Vobiz itself.)

## Step 2 — Buy a phone number (DID)

1. In the Vobiz console, go to the **DID / Phone Numbers** section.
2. Filter by country/region and pick a number that supports **Voice** (inbound + outbound).
3. Purchase it. This number is your caller ID for outbound and your ring-in number for inbound.
4. Record it in **E.164 format with the `+` and country code** — e.g. `+919876543210`.
   → This becomes the **Phone Number** field in QCall.

## Step 3 — Create a SIP trunk

1. Go to **Trunks** in the sidebar and click **Create**.
2. Give it a name (e.g. `qcall-trunk`) and set the trunk type to support both directions
   (you'll use it for outbound termination *and* inbound origination).
3. On save, Vobiz auto-provisions a unique **SIP domain** in the form
   `{trunk_id}.sip.vobiz.ai` (e.g. `abc123.sip.vobiz.ai`).
   → This becomes the **SIP Termination URI** in QCall.

> Default trunk settings (transport `udp`, CPS limit, status `active`) are fine to start. You can
> tune concurrency/CPS later.

## Step 4 — Create SIP credentials (username + password)

1. Open your trunk → **Credentials** → **Create Credential**.
2. Set a **username** (e.g. `qcall_prod`) and a **strong password** (12+ chars, mixed case, digits,
   symbols).
3. **Copy the password now** — Vobiz stores it hashed and will **never show it again**. If you lose
   it, you must create a new credential.
   → Username + password become **SIP Username** and **SIP Password** in QCall.

> Vobiz also supports IP-based auth. QCall authenticates with **username/password**, so credential
> auth is required. (You may additionally IP-whitelist LiveKit's egress IPs for defense-in-depth,
> but it's optional.)

## Step 5 — Attach your DID to the trunk

1. Go to your DID number's settings and **associate it with the trunk** you created in Step 3.
2. Leave the inbound destination for now — you'll point it at QCall in **Part C**, after QCall
   gives you the LiveKit SIP URI.

✅ **At this point you should have all four values** for the cheat-sheet:
SIP domain, username, password, and DID number.

***

# Part B — QCall dashboard: add the SIP Dialer

This is what a customer actually clicks in the QCall app.

1. Log in to the **QCall dashboard**.

2. Go to **Settings → Dialers** (the "Dialers" / "Phone Numbers" area).

3. Click **➕ Add Dialer** and choose **SIP** as the dialer type.

4. Fill in the form using your cheat-sheet:

   | Field                   | What to enter                                            |
   | ----------------------- | -------------------------------------------------------- |
   | **Dialer Name**         | Any label, e.g. `My Vobiz Line`                          |
   | **Phone Number**        | Your Vobiz DID in E.164, e.g. `+919876543210`            |
   | **SIP Termination URI** | Your Vobiz SIP domain, e.g. `abc123.sip.vobiz.ai`        |
   | **SIP Username**        | The Vobiz credential username, e.g. `qcall_prod`         |
   | **SIP Password**        | The Vobiz credential password (paste the one you copied) |

5. Click **Create / Save**.

**What QCall does behind the scenes** (no action needed from you):

* Creates a **LiveKit outbound trunk** → sends outbound calls to your Vobiz SIP domain,
  authenticated with your username/password, using your DID as caller ID.
* Creates a **LiveKit inbound trunk** → matched to your DID number.
* Creates a **dispatch rule** → routes incoming calls on that number to your AI agent.

**What QCall gives you back:** on success, the dialer now exists and QCall exposes your
**LiveKit SIP URI** (shown in the dialer's SIP config / setup instructions, format
`yourproject.sip.livekit.cloud`). **Copy it — you need it for Part C.**

> If you don't see the SIP URI in the UI, it's a fixed value for your QCall workspace — ask QCall
> support and they'll provide your LiveKit SIP domain.

***

# Part C — Vobiz: finish the inbound loop-back

Inbound calls only reach your AI agent once Vobiz knows where to forward them.

1. Return to the **Vobiz console** → your trunk (or DID) → inbound routing settings.
2. Set the inbound **destination / origination URI** to your QCall **LiveKit SIP URI** from Part B.
   * Enter it **without** the `sip:` prefix, e.g. `myproj-x1y2.sip.livekit.cloud`.
   * If Vobiz asks for a full URI format, use `sip:myproj-x1y2.sip.livekit.cloud:5060`.
3. Make sure the DID from Step 2 is the number bound to this inbound route.
4. Save.

Now the loop is closed:

* **Outbound:** QCall → `abc123.sip.vobiz.ai` (your Vobiz trunk) → PSTN.
* **Inbound:** Caller → your DID → Vobiz → `myproj-x1y2.sip.livekit.cloud` (QCall) → AI agent.

***

## Testing

**Outbound test**

1. In QCall, assign the new SIP dialer to a campaign or a Playground test call.
2. Place a call to your own mobile. It should ring with your Vobiz DID as caller ID and the AI
   agent should speak when you answer.

**Inbound test**

1. From any phone, call your Vobiz DID number.
2. It should connect to your AI agent (assign an inbound assistant to this dialer/number in QCall
   first).

***

## Troubleshooting

| Symptom                                      | Likely cause & fix                                                                                                               |
| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `Failed to create SIP configuration` on save | One of the SIP fields is wrong/empty. Re-check SIP domain, username, password. All are required.                                 |
| Outbound call fails / 401 / 403 at carrier   | Wrong username/password, or the credential isn't attached to the trunk whose SIP domain you entered.                             |
| Outbound rejected (number/format)            | DID must be E.164 with `+` in QCall. Confirm the DID is enabled for outbound on Vobiz.                                           |
| Inbound call never reaches the agent         | Part C not done, or wrong LiveKit SIP URI. Verify Vobiz inbound destination = your `*.sip.livekit.cloud` URI (no `sip:` prefix). |
| "This phone number is already being used"    | The DID is already registered to another QCall dialer/workspace. Delete the old dialer or use a new DID.                         |
| Audio one-way or choppy                      | Transport/codec mismatch. Ensure the Vobiz trunk allows standard telephony codecs (μ-law/PCMU, 8 kHz).                           |
| Password stopped working                     | Vobiz passwords are write-once. If rotated/lost, create a new Vobiz credential and update the QCall dialer.                      |

***

## Sources

* [Vobiz Quick Start](https://docs.vobiz.ai/quick-start)
* [Vobiz — Create a Trunk](https://docs.vobiz.ai/trunks/create-trunk)
* [Vobiz — Trunk Credentials](https://docs.vobiz.ai/trunks/credentials/credential-object)
* [Vobiz — LiveKit Integration](https://docs.vobiz.ai/integrations/livekit)
* [Vobiz — Origination URIs](https://docs.vobiz.ai/trunks/origination-uri/origination-uri-object)
