# Vobiz Integration

> Configure Vobiz for voice communication in Menace Voice

## What you need

- A [Vobiz account](https://vobiz.ai) with eKYC completed where required.
- One Vobiz local, national, or toll-free number with Voice capability.
- Your Vobiz **Auth ID** and **Auth Token**.
- A Vobiz Application. Menace Voice can create this for you.

## Estimated price

Vobiz publishes pay-per-minute pricing with no monthly minimum, but its public
pages do not publish one universal DID rental amount. The number price varies
by country and number type. Review the live price before provisioning on the
[Vobiz Number Provisioning page](https://www.vobiz.ai/products/number-provisioning/).

## Set up Vobiz step by step

### 1. Provision a number

1. Sign in to [Vobiz Console](https://console.vobiz.ai/).
2. Complete the requested eKYC and business verification.
3. Open number provisioning and choose the country, area code, and local,
   national, or toll-free number type.
4. Select a Voice-capable number and review its price and requirements.
5. Purchase the number and wait for it to become active.

### 2. Copy your credentials

Copy the account **Auth ID** and **Auth Token**. Vobiz sends these as
`X-Auth-ID` and `X-Auth-Token`; the Auth ID is the account identifier, not your
phone number. See [Vobiz authentication](https://www.docs.vobiz.ai/authentication).

### 3. Connect Vobiz in Menace Voice

1. Open **Phone numbers** and click **Add phone number**.
2. Choose **Vobiz** and continue.
3. Paste the **Auth ID** and **Auth Token**.
4. Leave **Application ID** blank unless you already have a dedicated Vobiz
   Application. Menace Voice creates one when the field is blank.
5. Enter the number with its country code and choose an inbound agent.
6. Finish setup. Menace Voice attempts to attach the number to the Application
   and set its answer URL.

### 4. Test the number

Call the number from another phone and confirm the selected agent answers.
If Menace Voice reports a sync warning, use the manual application checks below.

## Inbound Calling Setup

Vobiz numbers don't carry an `answer_url` directly — the URL lives on a Vobiz **Application**, and each number is linked to one application. **When you save an inbound workflow on a phone number, Menace Voice automatically pushes the webhook URL to your Vobiz Application's `answer_url`** (provided the credentials are correct). If Menace Voice auto-created the application during configuration save, the `answer_url` is already set and this push is a no-op.

### Step 1: Link the Phone Number to Your Vobiz Application

1. Log in to your Vobiz Console and open the **Applications** section
2. Edit the application whose ID you configured in Menace Voice
3. Attach the phone number you want to use for inbound calls
4. Save

   <img
     className="block dark:hidden"
     src="/images/vobiz-inbound-config-3.png"
     alt="Vobiz application showing phone number attachment interface"
   />
   <img
     className="hidden dark:block"
     src="/images/vobiz-inbound-config-3.png"
     alt="Vobiz application showing phone number attachment interface"
   />

### Step 2: Assign an Inbound Workflow to the Phone Number in Menace Voice

1. Go to **/telephony-configurations** and open your Vobiz configuration
2. In the **Phone numbers** section, edit the number that should receive inbound calls
3. Set its **Inbound workflow** to the agent that should answer
4. Save

### Step 3: Verify the Answer URL on the Vobiz Application

1. Open your Vobiz Console and navigate to **Applications**
2. Open the application whose ID you configured in Menace Voice
3. Confirm:
   - **Answer URL** is set to: `https://voice.menaceui.com/api/v1/telephony/inbound/run`
   - **Answer Method** is `POST`

   <Note>
     Menace Voice pushed this URL automatically when you saved the inbound workflow
     in Step 2. The same URL is shared across every number linked to that
     application — Menace Voice routes each inbound call to the right agent based
     on the called number's inbound workflow assignment. If the field is
     empty, shows a different URL, or Menace Voice surfaced a sync warning on
     save, the auto-push failed — most often because the Auth ID/Token or
     Application ID in Menace Voice is incorrect. Paste the URL into the field
     yourself, set the method to `POST`, and save. On self-hosted Menace Voice,
     replace `voice.menaceui.com` with your backend domain.
   </Note>

### Step 4: Verify Setup

- Ensure your Menace Voice instance is publicly accessible
- Verify any firewalls allow Vobiz's webhook requests

### Test Inbound Calling

1. Call your configured Vobiz phone number from another phone
2. Verify your Menace Voice agent answers and responds
3. Check call logs in both Menace Voice dashboard and Vobiz dashboard

## Troubleshooting

<AccordionGroup>
  <Accordion title="Invalid phone number error">
    Ensure phone numbers include country code in E.164 format: `+1234567890`
  </Accordion>
  
  <Accordion title="Authentication failed">
    - Verify Auth ID and Auth Token are correct
    - Check for extra spaces in credentials
    - Ensure credentials haven't been regenerated in Vobiz dashboard
  </Accordion>
  
  <Accordion title="Webhook requests failing">
    - Confirm your Auth Token matches exactly
    - Verify the webhook URL is accessible from Vobiz servers
    - Check if you're behind a proxy that modifies requests
  </Accordion>
  
  <Accordion title="No audio on calls">
    - Verify WebSocket connection is established
    - Check firewall rules for WebSocket traffic
    - Ensure audio pipeline is configured correctly
  </Accordion>
  
  <Accordion title="Inbound calls go to voicemail or aren't answered">
    - Verify the phone number is linked to the same Vobiz Application whose
    ID you configured in Menace Voice - Confirm the called number exists in your
    Menace Voice telephony configuration and has an **Inbound workflow** assigned
    - After assigning the inbound workflow, confirm Menace Voice successfully
    updated the application's `answer_url` (no warning shown on save) -
    Verify Menace Voice instance is running and responding
  </Accordion>

  <Accordion title="Voice agent doesn't respond to inbound calls">
    - Confirm the phone number has an **Inbound workflow** assigned in
    /telephony-configurations - Check webhook signature validation is working
    (Auth Token in Menace Voice matches Vobiz dashboard) - Verify WebSocket connection
    establishes successfully - Review call logs for error messages
  </Accordion>
</AccordionGroup>

## Best Practices

- Test your configuration with a single call before running campaigns
- Monitor Vobiz dashboard for usage and billing
- Keep your Auth Token secure and rotate it periodically
- Use a dedicated Vobiz Application for Menace Voice so the shared `answer_url` doesn't conflict with other systems
