> ## 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.

# Pipedrive + Vobiz | Softphone & Automatic Call Logging

> Call your Pipedrive contacts from the browser over Vobiz. Every answered call is logged in Pipedrive as an Activity and a Call Log, with the recording attached.

Vobiz Calling for Pipedrive is a browser softphone and a small Node.js backend that you host yourself. Your agents sign in with a Vobiz account, place and answer calls in a browser tab, and see the matching Pipedrive contact while they dial. When a call's recording is ready, the backend writes the call into Pipedrive and uploads the audio to the Call Log.

**Source code:** [vobiz-ai/Vobiz-Pipedrive-Calling](https://github.com/vobiz-ai/Vobiz-Pipedrive-Calling)

## Features

> [card] Click-to-call
>
> Type a number or use the keypad. Audio runs over WebRTC in the tab, so you need no desk phone and no desktop app.

> [card] Inbound calls
>
> Calls to a number you enable ring every signed-in agent on the account. Accept with **Enter**, decline with **Escape**.

> [card] Contact lookup
>
> The panel finds the Pipedrive person as you type a number, and when an inbound call rings.

> [card] Call logging
>
> Each answered call becomes a done *Call* Activity and a Call Log, linked to the matching person.

> [card] Recordings
>
> Every call is recorded. The audio is uploaded to the Pipedrive Call Log and listed in the panel.

> [card] Caller ID, agents and accounts
>
> Pick the outbound number. Each agent profile gets its own SIP endpoint, and several Vobiz accounts can share one backend.

The panel also has **Mute**, **Hold** and a DTMF keypad, and two sign-in modes: **Vobiz account** (set up for you automatically) and **SIP direct** (an existing endpoint).

## How it works

```text theme={null}
 Agent's browser                        Your backend                        Vobiz
 ┌───────────────────────┐             ┌───────────────────────┐       ┌─────────────┐
 │ Softphone page        │──sign-in───▶│ /api/login            │──API─▶│ Application │
 │ (JsSIP over WebRTC)   │             │                       │       │ SIP endpoint│
 │                       │═══SIP / audio (WSS) ═══════════════════════▶│ registrar   │
 │ Pipedrive in a tab    │             │ /answer  ◀──webhooks──────────│ voice       │
 └───────────────────────┘             │ /recording-callback   │       └─────────────┘
                                       │        │              │
                                       │        ▼  OAuth       │
                                       │   Pipedrive API       │
                                       └───────────────────────┘
```

* You run the backend on a public HTTPS URL. It serves the softphone page and receives Vobiz webhooks.
* When an agent signs in, the backend creates (or reuses) an application and a SIP endpoint in their Vobiz account, and gives the browser fresh SIP credentials for that endpoint.
* The softphone registers with the Vobiz registrar over secure WebSocket. Audio flows between the browser and Vobiz, not through your backend.
* **Outbound:** the browser places the call. Vobiz asks your backend's `/answer` URL what to do, and the backend tells Vobiz to dial the customer from your chosen caller ID and record the call.
* **Inbound:** Vobiz asks `/answer`, and the backend rings every signed-in agent on the account that owns the number.
* When the recording is ready, Vobiz calls `/recording-callback`. The backend looks up the caller in Pipedrive, writes the Activity and the Call Log, and uploads the audio.

## Prerequisites

| Requirement | Detail |
| - | - |
| Vobiz account | Its **Auth ID** and **Auth Token** from [console.vobiz.ai](https://console.vobiz.ai) under **API credentials** (not your login password), at least one active, voice-enabled number, and balance for your calls |
| Pipedrive | A company where you can install apps (usually an admin), and access to **Developer Hub** at [developers.pipedrive.com](https://developers.pipedrive.com) |
| Public HTTPS URL | For the backend, reachable by Vobiz and by your agents' browsers, for example `https://calling.example.com` |
| Node.js | 18.18 or later (20 or 22 recommended) |
| Agents | A current Chrome, Edge, Firefox or Safari, a microphone, and network access to `wss://registrar.vobiz.ai:5063` |

## Set up

**1. Install the backend**

```bash theme={null}
git clone https://github.com/vobiz-ai/Vobiz-Pipedrive-Calling.git
cd Vobiz-Pipedrive-Calling
npm install
cp backend/.env.example backend/.env
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"   # paste into SIGNING_SECRET
```

Set at least these in `backend/.env`:

```ini theme={null}
TUNNEL_URL=https://calling.example.com
SIGNING_SECRET=<the value you just generated>
```

> [!NOTE]
>
> `backend/.env` holds deployment settings only. No Vobiz Auth ID, Auth Token, SIP credentials or numbers go in it. Agents sign in with their own account.

**2. Start it and expose it over HTTPS**

```bash theme={null}
npm start    # listens on port 8092 by default
```

Put it behind your public HTTPS URL with a reverse proxy, a load balancer or a named tunnel. To try it out without a domain, `npm run tunnel` starts a Cloudflare quick tunnel and the backend picks up its URL when `TUNNEL_URL` is empty.

> [!WARNING]
>
> Quick-tunnel hostnames change on every restart. Do not use them for real traffic.

**3. Check that Vobiz can reach the answer URL**

```bash theme={null}
curl -s -X POST "https://calling.example.com/answer" \
  -d "From=sip:check@registrar.vobiz.ai&To=10000000000&RouteType=sip"
```

You must get an XML `<Response>` (for this test, a short message and `<Hangup/>`). A 404 page or a tunnel warning page means calls will fail.

**4. Create the Pipedrive app**

In [Pipedrive Developer Hub](https://developers.pipedrive.com), create an app. A private app is enough for your own company.

* **Callback URL:** `https://calling.example.com/auth/pipedrive/callback`. It must match `PIPEDRIVE_REDIRECT_URI` exactly.
* **Scopes:** turn on only these.

| Scope | Access | Used for |
| - | - | - |
| Activities (`activities:full`) | Full access | Creating the call Activity |
| Contacts (`contacts:read`) | Read only | Finding the person by phone number |
| Search for all data (`search:read`) | On | Fallback phone search |
| Call logs (`phone-integration`) | On | Creating the Call Log and uploading the recording |

Copy the app's credentials into `backend/.env` and restart the backend:

```ini theme={null}
PIPEDRIVE_CLIENT_ID=<client id>
PIPEDRIVE_CLIENT_SECRET=<client secret>
PIPEDRIVE_REDIRECT_URI=https://calling.example.com/auth/pipedrive/callback
```

**5. Connect Pipedrive**

Open `https://calling.example.com/auth/pipedrive` in a browser where you are signed in to Pipedrive, and approve the app. The page then says **Connected to Pipedrive**. To check at any time:

```bash theme={null}
curl -s https://calling.example.com/auth/pipedrive/status
# {"configured":true,"connected":true,"scope":"...","apiDomain":"https://yourcompany.pipedrive.com",...}
```

> [!WARNING]
>
> Do this right after you deploy. Until a company is connected, anyone who can reach `/auth/pipedrive` can connect one.

The backend stores the OAuth tokens in `backend/.pipedrive-tokens.json` and refreshes them on its own. To connect a different company later, disconnect first: sign in on the **Vobiz account** tab and press **Disconnect Pipedrive** (it asks for confirmation and affects everyone on this backend), or call `POST /auth/pipedrive/disconnect` with a signed-in session's `Authorization: Bearer <token>`.

**6. Open the softphone and sign in**

The softphone is served by your backend:

| URL | What it is |
| - | - |
| `https://calling.example.com/` | The softphone |
| `https://calling.example.com/agent-phone/index.html` | The same softphone, by its full path |
| `https://calling.example.com/pipedrive-app/pipedrive-cti-app.html` | The Pipedrive CTI app page. It redirects to the softphone |

Agents keep it open in its own browser tab, next to Pipedrive. Sign in as described below, allow the microphone, and wait for the badge to read **READY**.

## Sign in

The softphone has two tabs under **Sign in to Vobiz**.

![Vobiz Calling for Pipedrive panel showing a NOT SIGNED IN badge, a Not signed in banner, and step 1 Sign in to Vobiz with Auth ID, Auth Token and Agent profile fields](https://mintcdn.com/vobizai/kSL8DOhu3agrnHUk/images/pipedrive/not-signed-in.png?fit=max\&auto=format\&n=kSL8DOhu3agrnHUk\&q=85\&s=43d03f31137b63cb222882e7a01319e1)

The panel before sign-in.

### Vobiz account (recommended)

Enter your **Auth ID** (`MA_XXXXXXXX`) and **Auth Token**, choose an **Agent Profile**, and press **Log in**. Any Vobiz account can sign in, and several accounts can share the same backend. You do not create anything in the Vobiz Console by hand. On sign-in the backend:

1. Checks the Auth ID and Auth Token with Vobiz. If Vobiz rejects them, so does the softphone.
2. Finds or creates an application named **`Vobiz-Pipedrive-Calling`** in your account, with Answer URL `https://calling.example.com/answer`, Hangup URL `https://calling.example.com/hangup-callback` and Fallback URL `https://calling.example.com/fallback` (all POST). It reuses an application whose answer URL already points at this backend, or the one it created earlier under that name. It never changes any other application.
3. Finds or creates **one SIP endpoint per agent profile**, with the alias `pipedrive-<profile>`, attaches it to that application, and sets a new random SIP password that only this browser session receives.
4. Loads your account's active, voice-enabled numbers into **Choose a caller ID**.

![The panel showing a green READY badge, a Ready banner, the blurred Auth ID and Auth Token fields, an Agent profile selector, and a Signed in confirmation line](https://mintcdn.com/vobizai/kSL8DOhu3agrnHUk/images/pipedrive/ready-signed-in.png?fit=max\&auto=format\&n=kSL8DOhu3agrnHUk\&q=85\&s=dc14970d863e2591c233ad95b897a90a)

Registered. The badge reads READY.

The **Call** button stays disabled until the badge reads **READY**.

> [!TIP]
>
> Give each person their own agent profile. Signing in sets a new SIP password on the profile's endpoint, so a second browser on the same profile disconnects the first. The **Agent Profile** field suggests the profiles in `backend/agents.json` (copy `backend/agents.example.json` to start; the backend serves only their ids and display names, at `GET /api/agents`), and you can type a new profile id (letters, digits, `-` and `_`). Set `pipedriveUserId` on a profile to make that Pipedrive user the owner of its calls' Activities and Call Logs.

### Choose a caller ID

**Choose a caller ID** lists your account's active, voice-enabled numbers. Outbound calls show the number you pick, and the backend refuses any other number.

![The Choose a caller ID field expanded into a dropdown of Vobiz numbers with one highlighted, above the dialpad](https://mintcdn.com/vobizai/kSL8DOhu3agrnHUk/images/pipedrive/caller-id-dropdown.png?fit=max\&auto=format\&n=kSL8DOhu3agrnHUk\&q=85\&s=2551286272da02d1651f82b169739f22)

Selecting the outbound caller ID.

### Enable inbound calls

Signing in does not change where your numbers route. To take inbound calls on a number:

1. Select the number under **Choose a caller ID**. The line below shows where its inbound calls go now.
2. Press **Enable inbound calls on this number** and confirm.

This attaches the number to the `Vobiz-Pipedrive-Calling` application ([Attach a number to an application](https://www.vobiz.ai/docs/applications/attach-number.md)).

> [!WARNING]
>
> **This moves the number off the application it was attached to before.** The confirmation names that application by its ID, so you can move the number back in the Vobiz Console later.

Inbound calls ring every agent signed in to the account that owns the number, at the same time. The first to accept gets the call. If nobody from that account is signed in, the caller hears a short message and the call ends.

### SIP direct

Use this tab to sign in as an existing Vobiz SIP endpoint without giving the backend your account credentials. Enter the endpoint's **SIP Username** (the user part of its `sip_uri`) and **SIP Password**, and a **Calling From (Caller ID)** number on the same account in E.164 format (`+91XXXXXXXXXX`). Press **Connect**. The password stays in the browser and is never sent to the backend or saved. Inbound calls to the caller-ID number ring this softphone.

Because the backend holds no credentials for your account, you point the endpoint and the number at an application whose answer URL is your backend:

> [tab] Vobiz Console
>
> 1. **Voice → Applications:** create an application with Answer URL `https://calling.example.com/answer` (POST) and Hangup URL `https://calling.example.com/hangup-callback` (POST).
> 2. **Voice → Endpoints:** open your endpoint and set its **Application** to the new application.
> 3. **Phone Numbers:** open your number and set its **Application** to the same application.

> [tab] API
>
> ```bash theme={null}
> AUTH_ID=MA_XXXXXXXX
> AUTH_TOKEN=<your auth token>
> BACKEND=https://calling.example.com
> API=https://api.vobiz.ai/api/v1/Account/$AUTH_ID
> H=(-H "X-Auth-ID: $AUTH_ID" -H "X-Auth-Token: $AUTH_TOKEN" -H "Content-Type: application/json")
>
> # 1. Create the application. Note the app_id in the response.
> curl -s -X POST "$API/Application/" "${H[@]}" -d '{"app_name":"Vobiz-Pipedrive-Calling",
>   "answer_url":"'"$BACKEND"'/answer","answer_method":"POST",
>   "hangup_url":"'"$BACKEND"'/hangup-callback","hangup_method":"POST"}'
>
> # 2. Attach the endpoint, then read it back: application.app_id must be <APP_ID>.
> curl -s -X POST "$API/Endpoint/<ENDPOINT_ID>/" "${H[@]}" -d '{"app_id":"<APP_ID>"}'
> curl -s "$API/Endpoint/<ENDPOINT_ID>/" "${H[@]}"
>
> # 3. Attach the number (+91XXXXXXXXXX becomes %2B91XXXXXXXXXX).
> curl -s -X POST "$API/numbers/%2B91XXXXXXXXXX/application" "${H[@]}" -d '{"application_id":"<APP_ID>"}'
> ```
>
> Keep `app_id` as a string. It is too long to pass through a JavaScript number without losing digits. See [Update an endpoint](https://www.vobiz.ai/docs/endpoint/update-endpoint.md).

> [!NOTE]
>
> **Included with a Vobiz account sign-in:** the number list, **Enable inbound calls**, Pipedrive contact lookup in the panel, the recordings list, and recordings in Pipedrive. SIP direct logs calls to Pipedrive, without the recording. For SIP direct, set `VOBIZ_WEBHOOK_SIGNATURES` to a value other than `require`, because these calls carry no signature to check.

## Using it

### Outbound calls

1. Pick a caller ID under **Choose a caller ID**.
2. Type the number in E.164 format (`+91XXXXXXXXXX`) or use the keypad. As you type, the panel shows the matching Pipedrive contact.
3. Press **Call** (or **Enter**). While connected, use **Mute**, **Hold** and the keypad for DTMF. Press **Hang up** to end the call.

![Live call view showing a red Hang up button, a Calling status line with a timer, Mute and Hold buttons, and a Pipedrive CRM contact panel below](https://mintcdn.com/vobizai/kSL8DOhu3agrnHUk/images/pipedrive/active-call-controls.png?fit=max\&auto=format\&n=kSL8DOhu3agrnHUk\&q=85\&s=6ce2270f631dc2724458c59e71ac7088)

An active call, with in-call controls and the matched Pipedrive contact.

### Inbound calls

An incoming call shows the caller's number and the matching Pipedrive contact. Press **Accept** (**Enter**) or **Decline** (**Escape**). Keep the softphone tab open to receive calls.

![The panel with an ON CALL badge, a Ringing banner, and a green Incoming call card showing the calling number with Accept and Decline buttons](https://mintcdn.com/vobizai/kSL8DOhu3agrnHUk/images/pipedrive/incoming-call-popup.png?fit=max\&auto=format\&n=kSL8DOhu3agrnHUk\&q=85\&s=ee2a70b1a79f4b5efff937a61e8162c4)

The inbound prompt, with keyboard shortcuts.

### What is written to Pipedrive

When Vobiz reports that a call's recording is ready, the backend writes two records. Their owner is the agent profile's `pipedriveUserId` when it is set (for outbound calls, and inbound calls that rang only that agent); otherwise the Pipedrive user who authorized the app:

* **An Activity** of type *Call*, marked done, with the subject `Vobiz Outbound call - +91XXXXXXXXXX` (or `Inbound`), the duration rounded up to the minute, and a note with the call UUID, direction, numbers, agent, duration, hangup cause and a **Listen** link to the recording.
* **A Call Log**, with the outcome (`connected`, `busy` or `no_answer`), from and to numbers, start and end time, duration, and the recording audio uploaded to it.

Both are linked to the Pipedrive person whose phone number matches the other party, and to that person's deal when they have exactly one open deal (with none or several, no deal is linked). If no person matches, the records are created without a person. Unanswered calls produce no recording, so they are not logged.

![Call Finished notification card showing an Inbound call completed badge, the number, duration and finish time](https://mintcdn.com/vobizai/kSL8DOhu3agrnHUk/images/pipedrive/call-finished-sync.png?fit=max\&auto=format\&n=kSL8DOhu3agrnHUk\&q=85\&s=6627e22bd0574fe3115dd0c381b7a2b8)

Call finished.

### Recordings

Every call is recorded as MP3. You can play it:

* **In Pipedrive, on the Call Log.** The audio is uploaded there and stays playable for as long as the Call Log exists.
* **From the Activity note's Listen link.** The link is signed and expires after 15 minutes by default (`RECORDING_URL_TTL_SECONDS`).
* **In the softphone, under Call recordings.** It lists your account's 10 most recent recordings, each with a fresh signed link.

![Call recordings list showing timestamped entries with durations, two of them expanded into inline audio players](https://mintcdn.com/vobizai/kSL8DOhu3agrnHUk/images/pipedrive/call-recordings.png?fit=max\&auto=format\&n=kSL8DOhu3agrnHUk\&q=85\&s=76408fa8069474b5f0563022e7c90e79)

Recordings, with inline players.

### Backfilling missed calls

To log recent calls that were not written, for example while Pipedrive was not connected, run this while the backend is running. It writes your account's 10 most recent CDRs to Pipedrive:

```bash theme={null}
npm run fetch-cdr -- --auth-id MA_XXXXXXXX --auth-token <your auth token>
```

It does not check for calls already logged, so it can create duplicates. It signs in as the `admin` profile, which disconnects a browser signed in as `admin` on that account.

## Configuration

All settings go in `backend/.env`. Variables already set in the environment take precedence.

| Variable | Required | Default | Meaning |
| - | - | - | - |
| `TUNNEL_URL` | Yes | contents of `backend/tunnel-url.txt` | Public HTTPS base URL of the backend, no trailing slash. Set it before anyone signs in |
| `PUBLIC_BASE_URL` | No | — | Alias for `TUNNEL_URL`, used when `TUNNEL_URL` is empty |
| `PORT` | No | `8092` | Port the backend listens on |
| `SIGNING_SECRET` | Yes in production | random per start | Key for signing recording links. If unset, every link stops working when the backend restarts |
| `RECORDING_URL_TTL_SECONDS` | No | `900` | How long a recording link stays valid, in seconds |
| `DATA_DIR` | No | `backend/data` | Where endpoint IDs and SIP usernames are stored |
| `AGENTS_FILE` | No | `backend/agents.json` | Agent profiles: display names and optional `pipedriveUserId` |
| `VOBIZ_WEBHOOK_SIGNATURES` | No | `verify` | `verify`: reject a wrong signature, accept unsigned callbacks. `require`: reject anything without a valid signature (not compatible with SIP direct). `off`: no check |
| `VOBIZ_API_URL` | No | `https://api.vobiz.ai` | Vobiz API base URL |
| `VOBIZ_REGISTRAR` | No | `registrar.vobiz.ai` | SIP registrar the softphone registers with |
| `PIPEDRIVE_CLIENT_ID` | Yes | — | Client ID of your Pipedrive app |
| `PIPEDRIVE_CLIENT_SECRET` | Yes | — | Client secret of your Pipedrive app |
| `PIPEDRIVE_REDIRECT_URI` | No | `<TUNNEL_URL>/auth/pipedrive/callback` | OAuth callback. Must match the app's Callback URL exactly |
| `PIPEDRIVE_TOKEN_STORE` | No | `backend/.pipedrive-tokens.json` | Where the Pipedrive OAuth tokens are stored |
| `ALLOWED_ORIGINS` | No | — | Extra browser origins allowed to call the backend, comma separated. `https://*.pipedrive.com` and `localhost` are always allowed |
| `PIPEDRIVE_ALLOW_API_TOKEN` | No | `0` | `1` uses a personal API token instead of OAuth. OAuth takes priority when connected |
| `PIPEDRIVE_API_TOKEN` | No | — | Personal API token, used only with `PIPEDRIVE_ALLOW_API_TOKEN=1` |
| `PIPEDRIVE_API_URL` | No | `https://api.pipedrive.com/v1` | API base for the personal-token mode |
| `ALLOW_MOCK` | No | `0` | Development only. Returns labelled sample CRM data when Pipedrive is not connected |
| `VOBIZ_ENV_FILE` | No | `backend/.env` | Path of the configuration file to load |

## Production checklist

* **HTTPS on a stable hostname.** Vobiz must reach `/answer`, `/fallback`, `/dial-status`, `/recording-callback` and `/hangup-callback`, and browsers only allow the microphone on HTTPS.
* **Exactly one backend instance.** Sign-ins, sessions and in-progress calls are held in memory.
* **Persistent storage** for `DATA_DIR` and the Pipedrive token file. Both are written with mode `0600`.
* **A fixed `SIGNING_SECRET`**, so recording links survive restarts.
* **`TUNNEL_URL` set before anyone signs in.** If it changes, restart and have each account sign in again, which updates the `Vobiz-Pipedrive-Calling` application. Update the Pipedrive app's Callback URL and `PIPEDRIVE_REDIRECT_URI` yourself.
* **Strict webhook signatures.** After one call, look for `[signature] valid Vobiz signature` in the log, then set `VOBIZ_WEBHOOK_SIGNATURES=require` (unless you use SIP direct). See [Validating callbacks](https://www.vobiz.ai/docs/concepts/validating-callbacks.md).
* **Restricted access** if only your company should use the backend. Any Vobiz account can sign in, and every account's calls are logged to the one connected Pipedrive company.
* **A process manager** that restarts the backend on failure. After a restart, agents sign in again.

## Security and privacy

* **Your Auth Token never leaves the server and is never stored on disk.** The browser sends it once at sign-in and gets an opaque session token back, valid for 12 hours.
* **On disk:** endpoint IDs and SIP usernames, and the Pipedrive OAuth tokens, both mode `0600`. No SIP passwords and no Vobiz tokens.
* **The browser receives** its session token, the SIP credentials for its own endpoint, your account's numbers and signed recording links. Each sign-in sets a new random SIP password.
* **Recording links carry no credentials.** They are signed, expire, and work for one recording of one account only.
* **Every route that places calls, reads recordings, or reads or writes CRM data requires a signed-in session**, and acts only on that session's account. Caller IDs are limited to the account's own numbers.
* **The backend changes only its own resources** in your Vobiz account: the `Vobiz-Pipedrive-Calling` application and its `pipedrive-*` endpoints. A number moves only when you press **Enable inbound calls**.
* **CORS is an allowlist**, and Vobiz webhook signatures are checked with the Auth Token of the account each call belongs to.

## Troubleshooting

The backend log shows each step of a call. The most useful line is `[DIAL RESULT] ... bleg=<uuid>`. If `bleg` reads `(none — B leg never originated)`, Vobiz never reached the other party.

> [accordion] Sign-in says “Vobiz did not accept that Auth ID and Auth Token”
>
> The credentials are wrong, or the console login password was used. Copy both values from Console → **API credentials**.

> [accordion] Sign-in says “This server has no public URL (TUNNEL\_URL)”
>
> `TUNNEL_URL` is empty. Set it in `backend/.env` and restart.

> [accordion] The badge shows “Registration failed”
>
> In Vobiz account mode, the same agent profile signed in on another browser and changed the SIP password. Sign in again, one person per profile. In SIP direct, the username or password is wrong: use the user part of the endpoint's `sip_uri`.

> [accordion] The badge stays on “Connecting…”
>
> The backend is unreachable, or the agent's network blocks `wss://registrar.vobiz.ai:5063`. Check the backend log and the firewall.

> [accordion] Outbound: you hear “This phone is not signed in”
>
> The backend restarted and lost the sign-ins. Sign in again.

> [accordion] Outbound: the call fails at once
>
> If the log shows `bleg=(none…)`, the destination is unreachable, the caller ID is not on the account, or the balance is too low. If you hear *This Vobiz account has no phone number to call from*, activate a voice-enabled number and sign in again.

> [accordion] Nothing reaches the backend at all
>
> `TUNNEL_URL` is stale, or the endpoint is not attached to the application (the sign-in log says `NOT bound`). Fix `TUNNEL_URL`, restart and sign in again. In SIP direct, attach the endpoint yourself.

> [accordion] Inbound calls never ring, or the caller hears “no one is available”
>
> If the softphone never rings, the number is not attached to the integration's application: select it and press **Enable inbound calls on this number**. If the caller hears *no one is available*, nobody from the account that owns the number is signed in.

> [accordion] The log shows “\[signature] INVALID” and Vobiz gets 403
>
> `TUNNEL_URL` does not match the URL Vobiz is calling. Set it to the exact public URL, restart, and sign in again.

> [accordion] No Activity or Call Log appears in Pipedrive
>
> Check `GET /auth/pipedrive/status` for `"connected": true`. Unanswered calls are not logged. If the Activity has no person, add the phone number to the person in Pipedrive.

> [accordion] The Listen link says it is invalid, expired, or asks you to sign in
>
> Links expire after `RECORDING_URL_TTL_SECONDS`, and all links stop working if the backend restarts without a fixed `SIGNING_SECRET`. Play the audio on the Call Log or from the softphone's recordings list. If the link asks you to sign in, the backend restarted: sign in with that account, then reopen the link.

> [accordion] /auth/pipedrive says “Already connected” or “Authorisation rejected”
>
> *Already connected*: disconnect the current company first. *Authorisation rejected*: the approval took longer than 10 minutes or the backend restarted during it. Start again from `/auth/pipedrive`.

## Operating notes

* **Sign in again after a backend restart.** Until someone from an account does, its callers hear a short message and its recording links ask you to sign in.
* **Run one backend instance.** State is held in memory.
* **Each backend connects to one Pipedrive company.** Every signed-in Vobiz account's calls are logged to that company.
* **Calls are logged when the recording is ready.** `npm run fetch-cdr` can backfill other calls, without de-duplication.
* **Deals are linked when the match is clear:** a contact with one open deal gets the deal link.
* **Use one browser per agent profile.**
* **The softphone runs in its own browser tab,** alongside Pipedrive.
* **A Vobiz account sign-in** gives you recordings, the number list, contact lookup and **Enable inbound calls**. For SIP direct, set `VOBIZ_WEBHOOK_SIGNATURES` to a value other than `require`.

## Next steps

* Get the code: [vobiz-ai/Vobiz-Pipedrive-Calling](https://github.com/vobiz-ai/Vobiz-Pipedrive-Calling)
* Other CRMs: [Zendesk](https://www.vobiz.ai/docs/integrations/zendesk.md), [HubSpot](https://www.vobiz.ai/docs/integrations/hubspot.md), [Freshdesk](https://www.vobiz.ai/docs/integrations/freshdesk.md), [ServiceNow](https://www.vobiz.ai/docs/integrations/servicenow.md)
* Reference: [`<Dial>`](https://www.vobiz.ai/docs/xml/dial), [`<Record>`](https://www.vobiz.ai/docs/xml/record), [SIP endpoints](https://www.vobiz.ai/docs/endpoint/endpoint-object.md), [Validating callbacks](https://www.vobiz.ai/docs/concepts/validating-callbacks.md)


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