Skip to main content

Private AI (nothing leaves the building)

MonoPbx can run its AI features entirely inside your network: a language model on your own server for summaries, agent assist and the voice agent, on-device captions and helpers on the phones, and no request to a cloud AI provider. Fully private AI is the mode that makes this a guarantee instead of a convention: while it is on, a feature cannot call a cloud provider at all, and the console shows a check you can read.

What "private" means here​

A provider is local when its address is on the install's list of approved private endpoints. That list belongs to whoever operates the server and is set in the server configuration; a company administrator cannot add to it from the console. Every other provider (a vendor's own API, a public gateway that was not approved) is cloud.

The check covers the language-model and speech providers of the AI features: the voice agent, live assist, call and voicemail summaries, call analysis, transcription, live captions, the call assistant, translation, automation AI steps and knowledge embeddings. Integrations, custom tools and webhooks that you add yourself have their own rules (see AI tools, connectors and knowledge) and are not part of this check.

For the operator: approve a private endpoint​

The operator lists each approved destination in the server configuration, tagged with what it is approved for. The same list serves every feature that may reach a private host, so a host approved for ai stays refused for anything else. Entries are purpose=host or purpose=host:port, separated by commas:

# /etc/mpbx/mpbx.env (or the environment of the mpbx service)
MPBX_PRIVATE_EGRESS=ai=vllm.corp.example.com:8000,ai=whisper.corp.example.com:9000

Restart the service after changing it. The older MPBX_AI_PRIVATE_ENDPOINTS (a plain comma list) still works and counts as ai. A listed host may use plain http, any port and a private address. Link-local (cloud metadata), unspecified and multicast addresses are never allowed, and a URL with a user name or password stays refused. A company's own provider must use exactly a listed host (and port, when the entry has one); anything else keeps the normal rule that base URLs must be public https. A list with a mistake is ignored and logged, so the strict rule stays in force.

MPBX_AI_COMPANY_PRIVATE_HOSTS is a different, older switch that lets companies list hosts for their custom tools. It does not make a provider local.

Example: a language model and a speech server​

This docker-compose.yml runs a vLLM server and a Deepgram-compatible speech server next to the PBX. Replace the model name, images and tokens with your own, and keep the ports on your private network.

services:
vllm:
image: vllm/vllm-openai:latest
command: ["--model", "your-org/your-model", "--port", "8000"]
environment:
HUGGING_FACE_HUB_TOKEN: ${HF_TOKEN}
ports: ["8000:8000"]
deploy:
resources:
reservations:
devices: [{ driver: nvidia, count: all, capabilities: [gpu] }]
speech:
image: your-registry.example.com/deepgram-compatible-speech:latest
ports: ["9000:9000"]

The PBX reaches the speech server through the Deepgram adapter, so the server must speak Deepgram's API (a self-hosted Deepgram deployment does). Servers that only offer the OpenAI audio API are not supported yet; until they are, use on-device captions on the phones and leave server transcription off in private mode.

For the administrator: the setup wizard​

Open Admin > AI > Private AI (the Fully private AI badge on the AI page links to it). The wizard has four steps:

  1. Local endpoints. Add one provider per approved server in Admin > AI (an OpenAI-compatible provider for the language model, a Deepgram provider for speech) with the base URL of the approved server. A local server that needs no key still needs any non-empty key value in the provider form. The wizard lists the providers of your company that are local. If your operator has not approved an endpoint, it says so and stops here.
  2. What leaves today. The wizard lists every AI feature that is on, the provider it uses (or would pick on its own) and whether that provider is local or cloud. Each cloud use is flagged.
  3. Switch or turn off. For every flagged feature choose a local provider and, for a language model, the model name your server serves, or turn the feature off. Nothing is changed until you select Save for that feature.
  4. Test and turn on. Test connection runs the usual provider test against each local endpoint. When no cloud use is left, Turn on fully private AI is available and the final screen shows Nothing leaves this install with the list of endpoints in use.

Switching the mode on is refused while any enabled feature still uses a cloud provider. Switching it off is always possible; the features then use the providers they are set to.

What the mode enforces​

While Fully private AI is on:

  • A call to a cloud provider is refused before anything is sent (MPBX-AI-PRIVATE-MODE). A cloud fallback provider is skipped, never used silently.
  • A feature that names no speech provider picks among the local ones only.
  • You cannot save an enabled feature that names a cloud provider.
  • Server captions and server AI are offered to the phones only when their providers are local.
  • Knowledge search stays keyword-based unless the embeddings provider is local.

Test connection on a cloud provider still works; it sends a one-token test request and no company data.

On the phones​

When the company is in private mode, MonoPhone prefers what stays on the phone: live captions use the phone's own recogniser (on-device), and summaries and suggested replies use the phone's built-in model, where the phone has one. The app does not switch to a cloud service when the phone cannot do it; it shows that the feature is unavailable instead. Server captions and server AI are used only when the company's providers for them are local. See On-device AI in MonoPhone.

Seeing the status​

  • The AI page shows a Fully private AI badge when the mode is on and a notice listing the cloud uses when it is off and some exist.
  • GET /api/v1/ai/private-mode returns the same report for scripts and for the AI activity ledger: the mode, whether nothing leaves the install (private), every provider use with its locality, and the local endpoints in use. PUT /api/v1/ai/private-mode switches the mode (with If-Match).