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
WORKER_SHARED_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).
EnvDefaultMeaning
PORT8080TCP 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.
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.