Skip to content

Configuration Reference

The bridge is configured entirely from environment variables. The package ships a fully commented .env.example. Only three variables are required.

EnvMeaning
BRIDGE_SECRETThe shared secret from StandIn pairing. Must equal what StandIn holds, or the HMAC upgrade is rejected with 401.
ELEVENLABS_API_KEYServer-side ElevenLabs key. Mints signed URLs, uploads files, calls TTS. Never sent to the Teams side.
ELEVENLABS_AGENT_IDThe ElevenLabs agent that answers calls.
EnvDefaultMeaning
EL_HOSTapi.elevenlabs.ioRegional pin: api.us.elevenlabs.io, api.eu.residency.elevenlabs.io, api.in.residency.elevenlabs.io, api.sg.residency.elevenlabs.io. Restricted to *.elevenlabs.io.
EL_HOST_ALLOW_ANYunsetSet to true only to point EL_HOST at a deliberate trusted proxy/test host.
EL_ENVIRONMENTunsetEnvironment-specific agent resolution (e.g. a staging agent alongside production).
EL_FIRST_MESSAGEunsetLocalized greeting / spoken AI disclosure (first_message override; must be allowlisted in the agent’s security settings).
EL_AGENT_BRANCH_IDunsetPin a specific agent branch per deployment.
EL_TTS_VOICE_IDunsetEnables the deterministic governor goodbye (exact text via standalone TTS). Without it, the goodbye is delegated to the agent.
EL_TTS_MODEL_IDeleven_turbo_v2_5TTS model for the goodbye line.
EnvDefaultMeaning
MAX_CALL_MINUTES0 (off)Bridge-side hard cap per call, in minutes (fractional allowed).
GOODBYE_TEXTa default lineThe goodbye the bridge-side governor speaks.
GOODBYE_GRACE_MS8000How long to let the goodbye play out before ending the call when its duration is unknown (agent-said fallback). Always hard-bounded.
EnvDefaultMeaning
VISION_API_URLunsetAn OpenAI-compatible chat-completions endpoint with image input. Set it to enable path-2 vision (describe-then-answer).
VISION_API_KEYunsetBearer key for the vision endpoint (local endpoints may not need one).
VISION_MODELunsetVision model name (required when VISION_API_URL is set).

Continuous visual awareness: every change to the caller’s screen-share or camera is described and handed to the agent as background context, so it can refer to what is on screen without anyone invoking the look tool.

EnvDefaultMeaning
AMBIENT_VISION_ENABLEDfalseOpt-in. Each scene change costs one vision-model call, so the default must not spend.
MAX_VISION_PER_MINUTE30Sliding 60-second cap on paid vision calls per call, shared by ambient vision and the look tool, and applied whether or not ambient vision is on. 0 = all vision off.
AMBIENT_VISION_REQUIRE_RECORDINGtrueHold ambient pushes back until Teams reports recording.status == "active".

In a call with two or more humans the agent’s reply audio is withheld until someone addresses it by name, then flows freely for a short follow-up window so the exchange can continue. A 1:1 call is never gated, whatever these are set to.

EnvDefaultMeaning
GROUP_CALL_REQUIRE_ADDRESStrueThe gate itself. On by default: it only ever suppresses output, never adds a paid call, and a meeting is exactly where an interjecting bot is harmful. Set false to opt out.
GROUP_CALL_WAKE_PHRASESassistantComma-separated phrases that wake the agent. Matching is case-insensitive and word-boundary aware, so assistantship does not match. Rename this to your agent’s actual name.
GROUP_CALL_FOLLOW_UP_WINDOW_MS12000How long after being addressed the agent keeps answering without being named again. The window is refreshed while it is speaking, so a long reply is never cut mid-sentence.
EnvDefaultMeaning
PORT9442TCP port the bridge listens on.
BIND0.0.0.0Bind address.
HMAC_FRESHNESS_MS60000Allowed clock skew for the HMAC timestamp.
MAX_CONNECTIONS0 (= 64)Max concurrent connections.
MAX_CONNECTIONS_PER_IP0 (= 8)Max concurrent connections from one remote IP.
PRE_START_TIMEOUT_MS0 (= 10000)Drop a connection that authenticates but never sends session.start.
WORKER_IDLE_TIMEOUT_MS0 (= 90000)Dead-peer window: end the call after this long without any worker message (the worker heartbeats every 30 s). Frees the call id for reconnect and closes the billed ElevenLabs conversation.
STALE_CALL_REAPER_SECONDS120End a connected call that never went live (the ElevenLabs session never opened) with reason no-answer. Unlike the pre-start timeout this also covers a call that did send session.start and then wedged, which nothing else ends while the worker keeps heartbeating. 0 disables it. On by default because it spends nothing - it makes no provider call, it only frees local resources.
LOG_TRANSCRIPTSfalseLog ElevenLabs transcripts (still gated on Teams recording.status == "active").

The bridge also exposes GET /metrics (Prometheus text format, no auth): calls total/active, call seconds, upgrade rejections by cause, frames relayed each way, backpressure drops, and ElevenLabs connect failures. Like /healthz it is served on the same port - keep the port private to your network or scrape through your ingress. | LOG_LEVEL | info | debug | info | warn | error. An invalid value falls back to info. |

The audio format is fixed at pcm_16000 by design (the no-transcode contract) and is not configurable. The bridge validates the agent’s declared format at call start and ends the call on a mismatch.