Configuration reference¶
Every SIPHON_PBX_* environment variable siphon-pbx, its compose stack and its test harness read, one
entry each. deploy/e2e/test_configuration_reference.py fails when the code or a compose layer names a
variable this page does not list, or when this page lists one nothing reads.
How to read an entry:
- Default is what applies when the variable is unset. Where the compose layer and the binary have
different defaults, both are given: the compose one is what a
docker composedeployment gets. - Layers are the files under
deploy/that pass or use it.baseisdocker-compose.yml,telephonyisdocker-compose.telephony.yml,tlsisdocker-compose.tls.yml,hostisdocker-compose.host.yml,tls-host,teams,voice,geoip,redis,cdr,turnandturn-hostlikewise. "None" means no layer passes it: set it in a YAML file named bySIPHON_PBX_CONFIG, or in an override file of your own. - Read by is the service (and, inside it, the program) that acts on it.
- On change is what has to happen before a new value takes effect. Run
docker compose up -din every case below; this says what that then does. - siphon-pbx restarts: compose recreates siphon-pbx. Calls in progress are re-owned on reconnect.
- siphon-sip re-render: init-telephony writes a new
siphon.yaml, and apply-telephony has siphon-sip reload it, or restarts siphon-sip when the change is one a reload cannot take (a listener, the SIP address, the header policy). A restart drops the registrations siphon-sip holds in memory until each phone refreshes. - the shared namespace is recreated: the variable changes a port
telephony-netpublishes, so compose recreates it and with it siphon-sip, siphon-rtp and siphon-pbx, which share its namespace.
Most server settings also have a YAML key of the same name in lower case (SIPHON_PBX_LISTEN is
listen); crates/siphon-pbx-core/src/config.rs has them all. The environment wins over the file.
Core and HTTP¶
SIPHON_PBX_CONFIG¶
A YAML configuration file to read before the environment. Optional; the compose stack uses environment variables only. - Default: none. Layers: none. Read by: siphon-pbx (the server and every one-shot command). On change: siphon-pbx restarts.
SIPHON_PBX_IMAGE¶
The siphon-pbx image every compose service that runs it uses. Add docker-compose.build.yml to build it from the
checkout instead.
- Default: the published release the compose file names. Layers: base, telephony. Read by: Docker Compose.
SIPHON_PBX_LISTEN¶
The address and port of the HTTP server (the API and the web UI).
- Default: 127.0.0.1:8080 in the binary; 0.0.0.0:8080 in base, and the internal address on port
8080 in host. Layers: base, host. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_PORT¶
The host port base publishes the HTTP server on, or 127.0.0.1: to publish it on loopback only.
Under telephony it is published by telephony-net instead.
- Default: 8080. Layers: base, telephony, tls. Read by: Docker Compose. On change: the shared namespace
is recreated (under telephony), otherwise siphon-pbx restarts.
SIPHON_PBX_PUBLIC_URL¶
The address people open in a browser, such as https://pbx.example.com. It is the operator console's
host, the base of every link siphon-pbx writes (setup, invites, provisioning), and an https:// address
makes the session cookies secure. tls requires it. deploy/deploy-remote.sh reads it from the server's
.env to check the deployment afterwards.
- Default: unset in the binary; http://localhost:8080 in base; required in tls. Layers: base, tls.
Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_METRICS_LISTEN¶
Where Prometheus metrics and the health check are served. Kept off the API's address so only the monitoring
stack needs to reach it. It also serves the two questions the TLS proxy asks before it acts: /tls/allowed
(may a certificate be issued for a name) and /ws/allowed (may this browser's WebSocket upgrade on /sip go through,
by the organisation's list of origins), so the proxy must reach it.
- Default: unset (not served) in the binary; 0.0.0.0:9109 in base, the internal address on 9109 in
host. Layers: base, host. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_PROMETHEUS_URL¶
Where the stack's Prometheus is. The operator console's System view reads its rates from it; unset, the
graphs say they are unavailable.
- Default: unset in the binary; http://prometheus:9090 in base. Layers: base (host maps the name).
Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_NODE_ID¶
Which siphon-pbx node this is when more than one runs on one database: letters, digits, ., _ and -.
It is recorded on the node's registry row and rendered as siphon-sip's server.instance_id, the identity
the media engine holds and reattaches this node's calls under, so keep it stable. Blank counts as unset.
- Default: siphon-pbx. Layers: base, telephony. Read by: siphon-pbx and init-telephony. On change:
siphon-pbx restarts and siphon-sip re-render. Changing it on a running node orphans the calls the engine
holds under the old one. Two real nodes on one database must have distinct ids.
An upgrade in place may briefly run the old and the new release under one id, which is fine; when another
running process has shared this one's id for more than 15 minutes, siphon-pbx logs a warning naming this
variable every minute and siphon_pbx_processes_sharing_node_id is above zero. Web-call tokens are released
by process, so they do not depend on it.
SIPHON_PBX_CLUSTER_ADDRESS¶
The address the other nodes on one database reach this node at, as an IP address without a port. Recorded
on the node's registry row and shown in the System view beside its node id. Blank counts as unset, which
is right for a single node. init-telephony reads it too: when SIP binds a single address that is not this
one, siphon-sip gets an extra TCP listener on it, where the other nodes' hops arrive. siphon-pbx reads it for
voice sessions too: with it set, session tokens name this node, a bot's request for a session another node
holds is forwarded there, and when SIPHON_PBX_LISTEN binds a single address that is not this one, a second
HTTP listener on this address (same port) serves the voice session routes and nothing else.
- Default: unset. Layers: base, telephony. Read by: siphon-pbx, init-telephony. On change: siphon-pbx
restarts and siphon-sip re-renders.
SIPHON_PBX_CLUSTER_NETWORK¶
The networks the other siphon-pbx nodes on one database send their SIP from, as comma-separated CIDRs (a bare address is a single host). Another node's signed hop, which is how a phone registered on another node is rung, is acted on only from inside one of them; from anywhere else it is dropped and counted. They are also rendered into siphon-sip's abuse-control exemptions. A network that does not parse, or one holding every address, is refused at start. Blank counts as unset, which is right for a single node. - Default: unset. Layers: base, telephony. Read by: siphon-pbx, init-telephony. On change: siphon-pbx restarts and siphon-sip re-renders.
SIPHON_PBX_TRUSTED_PROXIES¶
The proxies in front of the HTTP server whose X-Forwarded-For is believed, as comma-separated addresses
or CIDR networks. A request is from the address that connected unless that address is in one of them; then
it is from the rightmost X-Forwarded-For entry that is not itself a trusted proxy, which is the address
the last trusted proxy saw. So a client connecting straight to the HTTP port from outside these networks
cannot name an address, and whatever a client writes into the header before a trusted proxy is never read.
The address is what the password sign-in throttle counts by (10 wrong passwords per address, an IPv6
client by its /64, in 5 minutes, on each instance). A network with bits set after its prefix, or one that
is not a network at all, stops siphon-pbx at start. Blank counts as unset. Narrow it to the proxy's own
address where the HTTP port is reachable from a private network that is not the proxy.
- Default: 127.0.0.0/8, ::1/128, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, fc00::/7. Layers: base.
Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_SINGLE_ORGANISATION¶
Serve exactly one organisation, the one whose external reference this is, whatever host a request names. For a deployment embedded in another product's interface behind that product's own reverse proxy, where each install is one organisation and the Host header is whatever the proxy sends. Every request on the HTTP listener is that organisation's, looked up by reference on each one, so an organisation deleted while running leaves a host that is nobody's.
The organisation is not made at start, since it needs a real dialling plan: it is created the normal way, by the
operator API's PUT /api/v1/operator/organisations/by-ref/{reference} (idempotent). Until it exists every request
answers as a host that is no site does.
Bootstrap order, with no console to do any of it in:
1. Create an operator: SIPHON_PBX_OPERATOR_CREATE_EMAIL=operator@example.com docker compose run --rm operator-create.
It has no password and cannot sign in; it exists to own tokens.
2. Issue it a token: operator-token with SIPHON_PBX_OPERATOR_TOKEN_OPERATOR set to that address and the scopes
organisations:read,organisations:write.
3. Provision the organisation by reference with that token, giving its name, time zone and dialling plan.
Not served, each answering 404 as an unknown route does: the operator console (its UI paths, session, sign-in,
setup, invites, passkeys and every operator route a token may not use, so an operator token is the only way in);
an organisation's hostnames (POST and DELETE of one through the operator API); invites, /join, /view and the
organisation setup page, in the API and the UI; Teams routes of the operator API; and /tls/allowed, the
certificate gate the TLS proxy asks (/ws/allowed, the origin gate for WebSocket upgrades, is served in this mode and
decides for the one organisation whatever the Host). Still served: the operator API under /api/v1/operator/* to a bearer token on a
route tokens may use, /api/v1/openapi.json, /internal/*, voice sessions, provisioning links, metrics and the
organisation's own console and /api/v1 routes.
Refused at start, naming both the YAML key and the variable: teams.sbc_fqdn (SIPHON_PBX_TEAMS_SBC_FQDN, a
certificate per organisation hostname), proxy_dir (SIPHON_PBX_PROXY_DIR), caddy_storage
(SIPHON_PBX_CADDY_STORAGE) and certificate_issuer set to internal (SIPHON_PBX_CERTIFICATE_ISSUER), which are
the TLS proxy layer's. A reference an organisation cannot carry (printable ASCII, bounded length) is refused too.
Blank counts as unset, and unset leaves every host deciding its site as before.
- Default: unset. Layers: base. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_ORIGINATE_CONCURRENT_CALLS¶
How many calls placed through the API one organisation may have up at once. At least 1.
- Default: 5. Layers: none. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_ORIGINATE_CALLS_PER_MINUTE¶
How many calls one organisation may place through the API in a minute. At least 1.
- Default: 20. Layers: none. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_PROMPTS_DIR¶
The prompt store siphon-pbx writes and the media engine reads prompts from.
- Default: /prompts (the prompts volume in telephony). Layers: none. Read by: siphon-pbx. On change:
siphon-pbx restarts; the engine must see the same directory.
SIPHON_PBX_RECORDINGS_DIR¶
Where the media engine writes voicemail and call recordings before siphon-pbx moves them into the database.
- Default: /recordings (the recordings volume in telephony). Layers: none. Read by: siphon-pbx. On
change: siphon-pbx restarts; the engine must write to the same directory.
SIPHON_PBX_RECORDING_RETENTION_DAYS¶
How long a recorded call's audio is kept, in days, 1 to 366. A call is recorded as stereo Ogg Opus, about 240 KB a minute; recordings made before that are WAV, about 960 KB a minute.
- Default: 30. Layers: none, so a compose deployment gets 30 unless an override passes it. Read by:
siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_RECORDING_DELIVERY_FIRST_RETRY_SECONDS¶
How long a recorded call's upload to the organisation's receiver waits after its first failed attempt, in seconds, 1 to
3600. The wait doubles with every attempt after, up to an hour, and the upload is given up after 8 attempts (the
defaults give about two hours). Left at the default in production; set it short only to watch a retry in an
end-to-end test.
- Default: 60. Layers: none. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_GEOIP_DIR¶
A directory holding GeoLite2-Country.mmdb and/or GeoLite2-ASN.mmdb (GeoIP2 databases of the same kind
under those names work too), which the deployment's country and network rules place addresses with. You
download the files yourself under your own MaxMind licence; siphon-pbx never downloads one. Each is read at
start, checked with the reader's own verification, and read again within 30 seconds of the file changing. A
file that does not load, does not verify or is the wrong kind is refused with an error in the log, and the
database loaded before it stays in use. The console's Security section shows each database's state.
Unset (or blank), geo is unavailable: the console says so and the API refuses a country or network rule. A
rule whose database disappears later is ignored, with a warning in the log and a banner in the console,
rather than enforced: that fails open, so a missing file never locks anybody out, the operator included.
- Default: unset. Layers: geoip, which mounts the directory read-only at the same path and requires it.
Read by: siphon-pbx. On change: siphon-pbx restarts (a changed file inside the directory needs nothing).
SIPHON_PBX_PROXY_DIR¶
The TLS proxy's directory, the volume siphon-pbx shares with Caddy: where the rendered Caddyfile and Caddy's
admin socket are. Set, the deployment's address rules and rate limit in the console's Security section can be changed, and
each change is loaded into the proxy as it is saved; siphon-pbx proxy reset resets the proxy there. Unset,
the rules can be read and not changed, since no proxy would enforce them. An absolute path of letters,
digits and /._- only, or siphon-pbx stops at start. init-proxy, which renders the proxy's file before
Caddy starts, takes the directory as its argument and reads the stored rules from the database itself.
- Default: unset; /proxy in tls. Layers: tls. Read by: siphon-pbx. On change: siphon-pbx restarts.
Remote announcements¶
Where an announcement endpoint's HTTPS address may point, for an organisation's endpoints and the one the
operator provides. Each setting is a key in the YAML file named by SIPHON_PBX_CONFIG and a variable; the
variable wins when it is set and not blank.
- remote_announcements.allow_private_networks: whether an endpoint may be on a private, loopback or
link-local address. Default false, so only public addresses are reached and an address an organisation
typed cannot reach a service inside your network. Every request is screened against it, including the test
of an endpoint in the console, and so is an address when it is saved: one that resolves to anything the
policy does not admit, or does not resolve, is refused then.
- remote_announcements.trust_anchors_file: a PEM file of certificate authorities trusted beside the bundled
public ones, for an internal endpoint whose certificate a private authority signed. Default unset. An
unreadable file stops siphon-pbx at start.
- On change: siphon-pbx restarts.
SIPHON_PBX_REMOTE_ANNOUNCEMENTS_ALLOW_PRIVATE_NETWORKS¶
true or false (nothing else), overriding remote_announcements.allow_private_networks. Blank is unset.
- Default: unset (the file's value, which is false). Layers: base. Read by: siphon-pbx and
announcement-endpoint-apply, the same value for both. On change: siphon-pbx restarts.
SIPHON_PBX_REMOTE_ANNOUNCEMENTS_TRUST_ANCHORS_FILE¶
The path of a PEM file of certificate authorities, overriding remote_announcements.trust_anchors_file. Blank
is unset. An unreadable file stops siphon-pbx at start. announcement-endpoint-apply checks the address only and
needs no CA file.
- Default: unset (the file's value, which is none). Layers: base. Read by: siphon-pbx. On change:
siphon-pbx restarts.
Identity providers (YAML only)¶
Where an organisation's identity provider (OpenID Connect sign-in) may be. Like the remote announcements these
two keys have no environment variable: set them in the YAML file named by SIPHON_PBX_CONFIG, and they are
separate settings, so allowing one does not allow the other.
- identity_providers.allow_private_networks: whether a provider may be on a private, loopback or link-local
address. Default false, so only public addresses are reached and an issuer an administrator typed cannot
reach a service inside your network. Every request to a provider (its metadata, its keys and its token
endpoint) is screened against it, including the check when an administrator saves one in the console. Turn it
on for a provider that runs inside your own network.
- identity_providers.trust_anchors_file: a PEM file of certificate authorities trusted beside the bundled
public ones, for a provider whose certificate a private authority signed. Default unset. An unreadable file
stops siphon-pbx at start.
- Signing in through a provider needs the master key (SIPHON_PBX_MASTER_KEY_FILE): its client secret and each
sign-in's verifier are sealed under it. An organisation registers the redirect URI the console shows for each
of its hostnames at the provider.
- On change: siphon-pbx restarts.
Capture¶
SIPHON_PBX_HEP_LISTEN¶
Where captured SIP and RTCP arrive over HEP from siphon-sip and siphon-rtp. Unset, nothing is captured.
- Default: unset in the binary; 0.0.0.0:9060 in base, the internal address on 9060 in host. Layers:
base, host. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_HEP_PORT¶
The host port the HEP collector is published on, or 127.0.0.1: for loopback only.
- Default: 9060. Layers: base, telephony. Read by: Docker Compose. On change: the shared namespace is
recreated (under telephony).
SIPHON_PBX_HEP_KEY¶
A HEP authenticate key a sender must carry. Nothing in the stack sends one, so it is for a collector fed from outside the stack. - Default: unset (no key required). Layers: none. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_CAPTURE_RETENTION_DAYS¶
How long captured SIP and RTCP are kept, in days, 1 to 366. A day is one partition, dropped whole.
- Default: 7. Layers: base. Read by: siphon-pbx. On change: siphon-pbx restarts.
Database¶
SIPHON_PBX_DATABASE_URL¶
The postgresql:// URL siphon-pbx connects with. It may carry the password, but
SIPHON_PBX_DATABASE_PASSWORD_FILE is preferred (and wins when both are given). For a highly available
Postgres, name every server and ask for the primary:
postgresql://siphon_pbx@db-1:5432,db-2:5432/siphon_pbx?target_session_attrs=read-write. Each new
connection then finds the primary, and siphon-pbx retries what a failover interrupts on one
(docs/architecture.md, The database).
- Default: postgresql://siphon_pbx@localhost:5432/siphon_pbx in the binary;
postgresql://siphon_pbx@postgres:5432/siphon_pbx in compose, one variable for every compose service
that reads the database. Layers: base, telephony, tls. Read by: siphon-pbx, init-telephony, init-proxy,
init-database and the one-shots (brand-apply, voice-bot-apply, operator-create, operator-token). On change: siphon-pbx
restarts.
SIPHON_PBX_DATABASE_PASSWORD_FILE¶
A file holding the database password, as the secrets volume provides it.
- Default: unset in the binary; /secrets/postgres_password in compose. Layers: base, telephony, tls. Read
by: the same services as SIPHON_PBX_DATABASE_URL. On change: siphon-pbx restarts.
SIPHON_PBX_DATABASE_ADMIN_URL¶
The postgresql:// URL siphon-pbx init-database connects with: a role that can create roles and grant
on siphon-pbx's database, for a Postgres where siphon-pbx's own role cannot (a managed one). It may be a
host list like SIPHON_PBX_DATABASE_URL, and names that URL's database or none; init-database connects to
that database either way. The server never reads it. Blank is unset.
- Default: unset (siphon-pbx sets the roles up itself, as its role is the superuser on a single box).
Layers: base. Read by: init-database. On change: re-run init-database.
SIPHON_PBX_DATABASE_ADMIN_PASSWORD_FILE¶
A file holding the password of the role SIPHON_PBX_DATABASE_ADMIN_URL names: in compose, a path inside
the init-database container, so put the file in the secrets volume. Blank is unset.
- Default: unset. Layers: base. Read by: init-database. On change: re-run init-database.
SIPHON_PBX_DATABASE_CA_FILE¶
A PEM file of the CA certificates (one or several) a database's certificate is verified against, for a
private CA. It applies only to a URL with sslmode=require, and with it every connection siphon-pbx,
init-database and the one-shots make is TLS, with the certificate checked against these roots and against
the host connected to (what libpq calls verify-full); without the file the compiled-in web roots are used.
For a database reached over a network, ask for TLS and channel binding together:
postgresql://siphon_pbx@db.example.com:5432/siphon_pbx?sslmode=require&channel_binding=require.
A file that cannot be read or holds no certificate stops startup, and so does setting it with a URL that does
not ask for sslmode=require, where it would never be used. In compose it is a path inside the containers:
put the file in the secrets volume. Any other sslmode (the default prefer included) connects in
plaintext, as before. Blank is unset.
- Default: unset. Layers: base, telephony, tls. Read by: the same services as SIPHON_PBX_DATABASE_URL. On
change: siphon-pbx restarts.
SIPHON_PBX_SIP_CREDENTIALS_DATABASE¶
Where siphon-sip reads the SIP credentials it checks a REGISTER against, as host:port/database: a read
replica, or a database server other than the compose service. The role and its password stay the stack's
own, and the connection is plaintext.
- Default: postgres:5432/siphon_pbx. Layers: telephony. Read by: init-telephony. On change: siphon-sip
re-render.
SIPHON_PBX_SIP_DIGEST_ALGORITHMS¶
The digest algorithms siphon-sip challenges an unauthenticated REGISTER with, one WWW-Authenticate each, most
preferred first: a comma-separated list of MD5 and SHA-256, in either order or either alone, matched without
regard to case with whitespace around the names allowed. Offering both is valid (RFC 8760), but some softphones
never answer a 401 that carries more than one challenge and register when only MD5 is offered, which is what
this is for. An empty value, a name the credential view holds no hash for (such as SHA-512-256) or a name
listed twice stops init-telephony with an error naming this variable; nothing is corrected silently. Set blank
in .env it falls back to the default.
- Default: MD5,SHA-256. Layers: telephony. Read by: init-telephony. On change: siphon-sip restart. siphon-sip's
reload does not apply auth.algorithms (it reports it as needing a restart), so apply-telephony restarts it,
and phones registered on an in-memory registrar register again.
siphon-sip's registrar store¶
siphon-pbx itself keeps no state in Redis. These settings move siphon-sip's registrar from its own memory
into a Redis or Valkey, so a restarted siphon-sip comes back with the phones that were registered on it.
Each node keeps its bindings under a prefix of its own (siphon:reg:<node id>:), so two nodes on one
server neither count nor ring each other's phones, and a replacement node finds its bindings only under the
same SIPHON_PBX_NODE_ID (docs/architecture.md, siphon-sip's registrar on Redis or Valkey). All of them are
read by init-telephony, which renders them into siphon-sip's configuration; with none set, siphon-sip's
registrar stays in memory, exactly as before.
SIPHON_PBX_REDIS_URL¶
Where the registrar is kept: redis://host:port/db, rediss://host:port/db (TLS),
redis+sentinel://sentinel-1:26379,sentinel-2:26379/master/db or rediss+sentinel://.. (a Sentinel set,
which siphon-sip asks for the current master). It must not carry a password (use
SIPHON_PBX_REDIS_PASSWORD_FILE), a query parameter on a Sentinel URL, or ${. Blank is unset.
- Default: unset (siphon-sip's registrar in memory). Layers: telephony, redis. Read by: init-telephony. On
change: siphon-sip restarts.
SIPHON_PBX_REDIS_PASSWORD_FILE¶
A file holding the password siphon-sip authenticates to the Redis or Valkey with. init-telephony writes it into siphon-sip's configuration, a file only siphon-sip reads. Blank is unset; an empty file stops startup. - Default: unset (no password). Layers: telephony, redis. Read by: init-telephony. On change: siphon-sip restarts.
SIPHON_PBX_REDIS_SENTINEL_PASSWORD_FILE¶
A file holding the password of the Sentinels themselves, when it differs from the data nodes'. Only with a
+sentinel URL. Blank is unset.
- Default: unset. Layers: telephony, redis. Read by: init-telephony. On change: siphon-sip restarts.
SIPHON_PBX_REDIS_CA_FILE¶
A PEM file of the CA a rediss server's certificate is verified against, for a private CA. Only with a
rediss URL; without it the public roots are used. init-telephony copies it into siphon-sip's
configuration volume under a name taken from its contents, so a rotated CA restarts siphon-sip onto it.
Blank is unset.
- Default: unset. Layers: telephony, redis. Read by: init-telephony. On change: siphon-sip restarts.
SIPHON_PBX_REDIS_SECRETS_DIR¶
The directory on the host that holds the files the three settings above name. The redis layer mounts it read-only into init-telephony at the same path, so name the files by their path in it. - Default: none; the redis layer requires it. Layers: redis. Read by: docker compose.
Secrets¶
init creates each of these files on the secrets volume. The variables name where to find them; there is
rarely a reason to change one.
SIPHON_PBX_MASTER_KEY_FILE¶
The master key that secrets kept in the database (trunk passwords, provider keys) are sealed under, as 64
hexadecimal characters. Back it up with the database: nothing sealed can be read back without it.
- Default: unset (nothing sealed can be stored); /secrets/master_key in compose. Layers: base. Read by:
siphon-pbx and voice-bot-apply. On change: siphon-pbx restarts.
SIPHON_PBX_SIP_AUTH_PASSWORD_FILE¶
The password siphon-pbx sets on the siphon_sip login role, which siphon-sip's credential backend uses.
Where siphon-pbx's role cannot manage roles, init-database sets it instead.
- Default: unset; /secrets/sip_auth_password in telephony. Layers: telephony. Read by: siphon-pbx and
init-database. On change: siphon-pbx restarts (and init-database re-runs, where it is used).
SIPHON_PBX_REGISTRATION_TOKEN_FILE¶
The token siphon-sip's REGISTER script presents on siphon-pbx's internal routes, and siphon-pbx presents
back when it pushes a NOTIFY. When siphon-pbx has none, those routes are not served.
- Default: unset in the binary, /secrets/registration_token in the script; that file in telephony.
Layers: telephony. Read by: siphon-pbx and siphon-sip (pbx_register.py). On change: both restart.
SIPHON_PBX_CONTROL_TOKEN_FILE¶
The bearer token siphon-pbx presents to siphon-sip's control plane. Required with SIPHON_PBX_CONTROL_URL.
- Default: unset; /secrets/control_token in telephony. Layers: telephony. Read by: siphon-pbx. On
change: siphon-pbx restarts.
SIPHON_PBX_ADMIN_TOKEN_FILE¶
The bearer token siphon-sip's admin API requires; init-telephony renders the same secret into siphon-sip's
configuration. Required with SIPHON_PBX_SIP_ADMIN_URL, and one without the other is refused at start.
- Default: unset; /secrets/admin_token in telephony. Layers: telephony. Read by: siphon-pbx. On change:
siphon-pbx restarts.
SIPHON_PBX_VOICE_RUNTIME_TOKEN_FILE¶
The token the voice runtime presents when it reads a call's brief. Required with
SIPHON_PBX_VOICE_RUNTIME_URL.
- Default: unset; /secrets/voice_runtime_token in voice. Layers: voice. Read by: siphon-pbx. On change:
siphon-pbx restarts.
SIPHON_PBX_TURN_SECRET_FILE¶
The secret siphon-pbx signs a browser's TURN credentials with, and siphon-rtp (--turn-secret-file) checks
them against. Both read the same file and trim it the same way: all surrounding whitespace is removed, and an
empty file is refused. init-secrets creates it. Needs SIPHON_PBX_TURN_URIS, and one without the other is
refused at start. YAML: turn.secret_file.
- Default: unset (no relay: the ice-servers route answers an empty list); /secrets/turn_secret in turn.
Layers: turn. Read by: siphon-pbx. On change: siphon-pbx and siphon-rtp restart.
Telephony and SIP¶
SIPHON_PBX_SIP_ADDRESS¶
The address phones and trunks reach this machine at, without a port. Required by telephony. siphon-sip
advertises it, siphon-rtp advertises it in SDP (--advertise-ip), and siphon-pbx uses it as its own host on
ISC. On a NAT'd host it is the public address. Give an IP literal: siphon-rtp takes nothing else.
init-sip-tls puts it in the internal hop's certificate, since that listener advertises it.
deploy/deploy-remote.sh documents it for the server's .env.
- Default: none, required. Layers: telephony, host. Read by: init-telephony, init-sip-tls, siphon-rtp and
siphon-pbx. On change: siphon-sip re-render (a restart, since the address is one a reload cannot take),
a new internal certificate, and siphon-rtp restarts.
SIPHON_PBX_SIP_PORT¶
The host port SIP (UDP and TCP 5060) is published on, or 127.0.0.1: for loopback only.
- Default: 5060. Layers: telephony. Read by: Docker Compose. On change: the shared namespace is
recreated.
SIPHON_PBX_SIP_BIND¶
The address siphon-sip binds SIP and its Prometheus listener to, and in host the address siphon-rtp
relays media on and the Teams listener binds. Set only where a stack shares a network namespace with
another, as two host-namespace test runs do.
- Default: 0.0.0.0. Layers: host, teams. Read by: init-telephony and siphon-rtp (host). On change:
siphon-sip re-render (a restart) and, in host, siphon-rtp restarts.
SIPHON_PBX_TELEPHONY_ADDRESS¶
The address the stack's internal listeners bind and reach each other at: siphon-sip's control plane and
admin API, siphon-rtp's control and metrics, the HEP collector, siphon-pbx's internal routes, the voice
runtime, and in host the database, Prometheus and the internal TLS hop. Loopback in the shared namespace.
- Default: 127.0.0.1. Layers: telephony, host, tls-host, voice. Read by: init-telephony, and through
compose every telephony service. On change: siphon-sip re-render, and every service that derives an
address from it restarts.
SIPHON_PBX_SIP_TLS_LISTEN¶
Where siphon-sip's TLS listener for the proxy's re-encrypted hop binds, as address:port. Moved only in
host, where the proxy holds 5061 on the machine itself.
- Default: 0.0.0.0:5061; the internal address on 5062 in host. Layers: host. Read by: init-telephony,
and init-sip-tls, which puts a concrete bind address in the hop's certificate. On change: siphon-sip
re-render (a restart). Move SIPHON_PBX_SIP_TLS_UPSTREAM_PORT with it.
SIPHON_PBX_SIP_WS_LISTEN¶
Where siphon-sip's SIP over WebSocket listener (RFC 7118) binds, as address:port. It is the hop for
browsers: the proxy takes their wss:// on 443 at /sip and sends the upgrade here with a PROXY header,
from the networks in SIPHON_PBX_SIP_TLS_PROXY_CIDR and no others. It is never published. Moved only in
host, to the internal address, so it is reachable from the machine alone. siphon-sip closes a WebSocket
that has sent nothing for 300 seconds.
- Default: 0.0.0.0:5080; the internal address on 5080 in host. Layers: host. Read by: init-telephony.
On change: siphon-sip re-render (a restart). Move SIPHON_PBX_SIP_WS_UPSTREAM_PORT with it.
SIPHON_PBX_SIP_TLS_PROXY_HOST¶
The compose service name of the TLS proxy, resolved by init-telephony to the proxy's own address on every
compose up. Leave it unset: with docker-compose.tls.yml in the stack the proxy is caddy and nothing needs
setting (the layer marks the stack, see SIPHON_PBX_TLS_PROXY_LAYER); set it only to name a proxy service of
another name. That address, as a /32 (or /128), is the only thing siphon-sip believes a PROXY header from
and the only thing it exempts from its rate limit, scanner block and auto-ban on that hop. It is never the
bridge's subnet, which contains the gateway (every docker-proxy relayed connection and every host-local one
arrives from it) and every other container. A name that does not resolve within two minutes, or that resolves to
the gateway, stops init-telephony with the reason and leaves siphon-sip's file as it was. Recreating the proxy
through compose up re-resolves it. The TLS layer gives the proxy a fixed address (SIPHON_PBX_TLS_PROXY_ADDRESS)
so a restart or a reboot cannot move it; one an operator moved anyway is refused by siphon-sip until the next
compose up.
SIPHON_PBX_NETWORK_SUBNET¶
The stack's bridge network under the TLS layer: its subnet. Move it, with the two below, only when the default
overlaps a network this machine already uses.
- Default: 172.29.250.0/24. Layers: tls (not in host, where the proxy is on the machine's own namespace).
Read by: compose. On change, and on the first upgrade to a release with this setting: compose down (volumes
stay), then compose up -d. Docker cannot change an existing network's subnet, so a plain up fails to start
the proxy and siphon-sip.
SIPHON_PBX_NETWORK_IP_RANGE¶
The part of SIPHON_PBX_NETWORK_SUBNET Docker hands other containers addresses from, which excludes the proxy's
fixed address so nothing can take it first. The network's gateway is this range's first address.
- Default: 172.29.250.128/25. Layers: tls. Read by: compose. On change: as SIPHON_PBX_NETWORK_SUBNET.
SIPHON_PBX_TLS_PROXY_ADDRESS¶
The TLS proxy's fixed address: inside the subnet, outside the range, never the gateway. It is what siphon-sip
trusts, so a restart or a reboot cannot move it.
- Default: 172.29.250.10. Layers: tls. Read by: compose. On change: as SIPHON_PBX_NETWORK_SUBNET.
SIPHON_PBX_TLS_PROXY_LAYER¶
Not for operators: docker-compose.tls.yml sets it to 1 on the init one-shot, which keeps the marker file
tls_proxy_layer in the secrets volume (written when set, removed when not, on every compose up) that
init-telephony reads to know the stack has a proxy.
- Default: unset. Layers: tls. Read by: init-secrets.
SIPHON_PBX_SIP_TLS_PROXY_CIDR¶
The TLS proxy's own address, pinned: single hosts only (/32, /128), comma-separated, one per proxy. A
subnet or a gateway is refused and stops init-telephony. Wins over SIPHON_PBX_SIP_TLS_PROXY_HOST where both
are set. siphon-sip accepts a PROXY header from these alone and exempts them from its abuse controls.
- Default: unset; the internal address /32 in host. Layers: telephony, host. Read by: init-telephony. On
change: siphon-sip re-render.
SIPHON_PBX_APIBAN_KEY¶
The APIBAN community blocklist's key. Set, siphon-sip polls the feed and refuses the addresses on it;
configured carriers are never refused by it. One key for the whole machine.
- Default: unset (no security.apiban block). Layers: telephony. Read by: init-telephony. On change:
siphon-sip re-render (a reload).
SIPHON_PBX_LOG_FORMAT¶
How the engines write their log: pretty or json (one object per line, no colour codes, for a log shipper).
Case does not matter. Blank is pretty; any other value stops the start. siphon-pbx installs the matching
layer on stdout, and init-telephony renders log.format: json into siphon-sip's configuration (pretty
renders no log block). siphon-rtp has no such option and stays text. docs/architecture.md, "Logs and call
detail records for a log shipper".
- Default: pretty. Layers: base, telephony. Read by: siphon-pbx and init-telephony. On change: siphon-pbx
restarts, and siphon-sip restarts.
SIPHON_PBX_CDR_DIR¶
An absolute path to a directory on the host where siphon-sip writes call detail records (cdr.jsonl, JSON
lines). The cdr layer mounts it into siphon-sip at the same path and requires it. Unset (no layer), siphon-sip
keeps no records and no cdr block is rendered.
- Default: unset. Layers: cdr. Read by: init-telephony, docker compose. On change: siphon-sip restarts.
SIPHON_PBX_CDR_ROTATE_SIZE_MB¶
The size in megabytes at which siphon-sip renames the record file to cdr.jsonl.<UTC timestamp>. It never
deletes a rotated file. 0 turns rotation off. Blank is the default. Only with SIPHON_PBX_CDR_DIR.
- Default: 100 (siphon-sip's own). Layers: cdr. Read by: init-telephony. On change: siphon-sip restarts.
SIPHON_PBX_CDR_HTTP_URL¶
An http:// or https:// collector every record is also POSTed to, beside the file. Blank is unset. Only
with SIPHON_PBX_CDR_DIR.
- Default: unset. Layers: cdr. Read by: init-telephony. On change: siphon-sip restarts.
SIPHON_PBX_CDR_HTTP_TOKEN_FILE¶
A file on the host holding the collector's bearer token. The cdr layer mounts it read-only into init-telephony
only, which writes Bearer <token> into siphon-sip's configuration (a file only siphon-sip reads, readable by
its owner alone), because siphon-sip's auth_header takes no file. An empty or unreadable file stops
startup. Blank is unset. Only with SIPHON_PBX_CDR_HTTP_URL.
- Default: unset (no Authorization header). Layers: cdr. Read by: init-telephony. On change: siphon-sip
restarts.
SIPHON_PBX_CONTROL_URL¶
siphon-sip's control-plane WebSocket, ws:// or wss://. Unset, the API, the UI and capture work and no
call is handed to siphon-pbx.
- Default: unset; ws://<internal address>:9092/control/ws in telephony. Layers: telephony. Read by:
siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_CONTROL_APP¶
The application name siphon-sip hands calls to; siphon-sip's configuration names the same one.
- Default: pbx. Layers: none. Read by: siphon-pbx. On change: siphon-pbx restarts, and the name
init-telephony renders (always pbx) has to match, so leave it unset in the compose stack.
SIPHON_PBX_SIP_ADMIN_URL¶
Where siphon-sip serves its admin API, which the System view reads registrations, live calls, bans and
warnings through, and which siphon-pbx asks to refresh trunks. Needs SIPHON_PBX_ADMIN_TOKEN_FILE.
- Default: unset (the System view says siphon-sip is not configured for it);
http://<internal address>:9093 in telephony. Layers: telephony. Read by: siphon-pbx. On change:
siphon-pbx restarts.
SIPHON_PBX_MEDIA_METRICS_URL¶
Where siphon-rtp serves --metrics-addr (/metrics, /healthz, /readyz), for the System view.
- Default: unset; http://<internal address>:9091 in telephony. Layers: telephony. Read by: siphon-pbx.
On change: siphon-pbx restarts.
SIPHON_PBX_SIP_HTTP_LISTEN¶
Where siphon-sip's REGISTER script serves the route siphon-pbx pushes NOTIFYs to (message-waiting), as
address:port. One value for both sides: siphon-sip binds it through siphon-sip/http.yaml, and compose
builds SIPHON_PBX_SIP_NOTIFY_URL from it.
- Default: <internal address>:8090. Layers: telephony. Read by: siphon-sip (http.yaml) and Docker
Compose. On change: siphon-sip and siphon-pbx restart.
SIPHON_PBX_SIP_NOTIFY_URL¶
Where siphon-pbx sends a NOTIFY when a mailbox changes, so a phone's message-waiting light follows it.
Derived from SIPHON_PBX_SIP_HTTP_LISTEN in compose; set that instead.
- Default: http://127.0.0.1:8090. Layers: telephony. Read by: siphon-pbx. On change: siphon-pbx
restarts.
SIPHON_PBX_INTERNAL_URL¶
Where siphon-sip's REGISTER script reaches siphon-pbx's internal routes.
- Default: http://127.0.0.1:8080 in the script; http://<internal address>:8080 in telephony. Layers:
telephony. Read by: siphon-sip (pbx_register.py). On change: siphon-sip restarts.
Media¶
SIPHON_PBX_MEDIA_PORT_MIN¶
The first UDP port of the window siphon-rtp relays media on. Two ports per leg. Under telephony the
window is published as is.
- Default: 30000. Layers: telephony, host. Read by: siphon-rtp and Docker Compose. On change: the shared
namespace is recreated.
SIPHON_PBX_MEDIA_PORT_MAX¶
The last UDP port of that window.
- Default: 30063 in telephony (64 ports, 16 relayed calls), 30999 in host. Layers: telephony, host.
Read by: siphon-rtp and Docker Compose. On change: the shared namespace is recreated.
SIPHON_PBX_MEDIA_BIND¶
A host address prefix for the published media window, such as 127.0.0.1:, to publish it on one address
only. Test runs set it; a deployment leaves it empty.
- Default: empty (every address). Layers: telephony. Read by: Docker Compose. On change: the shared
namespace is recreated.
TLS proxy (Caddy)¶
siphon-pbx renders Caddy's configuration (caddy/Caddyfile is the default render). init-proxy writes it
onto the proxy volume before Caddy starts, and loads it into a Caddy that is already running, over its admin
socket on that volume, with no restart: a plain docker compose up -d of a new release recreates init-proxy and
leaves Caddy up, so the release's render takes effect without a manual step. With no Caddy answering (a first
start) it only writes the file; a Caddy that answers and refuses the render fails init-proxy, and the up, with
Caddy's reason, and Caddy keeps the configuration it had. docker compose exec siphon-pbx siphon-pbx proxy apply
/proxy is the same load by hand.
SIPHON_PBX_CERTIFICATE_ISSUER and SIPHON_PBX_SIP_TLS_UPSTREAM_PORT are placeholders in that file, which
Caddy expands from its own environment.
SIPHON_PBX_CERTIFICATE_ISSUER¶
Which authority Caddy issues certificates from: acme (Let's Encrypt), internal (Caddy's own, for a
network without one), or a whole issuer directive such as a staging ACME directory. siphon-pbx and
init-proxy read it too, for the wildcard certificate's site: internal renders that site with Caddy's own
authority and no DNS provider; anything else renders the ACME issuer with the provider's DNS challenge.
- Default: acme. Layers: tls. Read by: caddy (the rendered Caddyfile), siphon-pbx, init-proxy. On change:
init-proxy and caddy restart, and siphon-pbx restarts so its later renders agree.
The wildcard certificate (console, Security, Certificate)¶
Not an environment variable: set by an operator in the console, stored in the database (credentials sealed
under the master key, so init-proxy reads SIPHON_PBX_MASTER_KEY_FILE as siphon-pbx does), and loaded into
the proxy as it is saved. With a base of pbx.example.com, every name one label under it
(office.pbx.example.com, and a SIP domain such as sip.pbx.example.com) is served one *.pbx.example.com
certificate obtained by a DNS-01 challenge, and none of them gets a certificate of its own, so none appears
in the certificate transparency logs. pbx.example.com itself, and any name two labels under it, is issued
on demand as before.
DNS records: point *.pbx.example.com at the machine (A/AAAA, or a CNAME to the console's name). Point
pbx.example.com there too only if something is served at it. The base may not be the parent of the
console's own name (with the console at admin.pbx.example.com, pbx.example.com is refused): until the
wildcard is issued, a name under the base is not served at all.
Route 53: an IAM user's access key id and secret access key, a region, and optionally the hosted zone id. The machine's own role is not used. The user needs, for the base's hosted zone:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["route53:ListResourceRecordSets", "route53:ChangeResourceRecordSets"],
"Resource": "arn:aws:route53:::hostedzone/<hosted zone id>"
},
{
"Effect": "Allow",
"Action": "route53:GetChange",
"Resource": "arn:aws:route53:::change/*"
},
{
"Effect": "Allow",
"Action": ["route53:ListHostedZonesByName", "route53:ListHostedZones"],
"Resource": "*"
}
]
}
The last statement is only needed when no hosted zone id is given.
Cloudflare: a scoped API token (not the global API key) with Zone.Zone:Read and Zone.DNS:Edit on the
base's zone. The older two-token form (an API token with Zone.DNS:Edit and a zone token with
Zone.Zone:Read) is accepted, but the plugin marks it deprecated.
Issuance happens in the proxy, which does not report it to siphon-pbx: check Caddy's log for the name. With
SIPHON_PBX_CERTIFICATE_ISSUER=internal the wildcard is issued by Caddy's own authority and the provider is
not used. Real issuance through Route 53 or Cloudflare has only been proven on a live deployment.
SIPHON_PBX_CADDY_STORAGE_DSN¶
A Postgres connection string Caddy keeps its certificates, keys, ACME account and issuance locks in,
instead of the caddy-data volume, so several nodes serving the same names share one ACME state (a
certificate is issued once and served by all of them). Needs caddy-siphon 0.3.0 or later, which the tls
layer pins. The layer hands it to Caddy alone, as CADDY_STORAGE_DSN, and the rendered file names it as
{env.CADDY_STORAGE_DSN}, so the password is never in the render or Caddy's autosave.json; init-proxy
and siphon-pbx get only SIPHON_PBX_CADDY_STORAGE below. Use sslmode=verify-full for a database reached
over a network, and give Caddy a role of its own that owns only its own schema, named with search_path:
postgresql://caddy:<password>@db.example.com:5432/siphon_pbx?sslmode=verify-full&search_path=caddy.
Caddy creates its two tables (caddy_objects, caddy_locks) there on start, and does not start when it
cannot reach the database.
- Default: unset (each Caddy keeps its own state on its volume). Layers: tls. Read by: caddy, and Docker
Compose (which derives SIPHON_PBX_CADDY_STORAGE from it). On change: init-proxy and caddy restart, and
siphon-pbx restarts so its later renders name the same storage.
SIPHON_PBX_CADDY_STORAGE¶
Which storage the rendered Caddyfile names: file_system (Caddy's own volume, and no storage option in
the render) or postgresql (the global option storage postgresql { dsn "{env.CADDY_STORAGE_DSN}" }).
Blank is file_system. Only which storage, never the connection string: anything else, a connection
string included, stops init-proxy and siphon-pbx at start without repeating the value. The tls layer sets
it from SIPHON_PBX_CADDY_STORAGE_DSN (postgresql when that is set), so set that one rather than this.
- Default: blank (file_system). Layers: tls (derived). Read by: siphon-pbx, init-proxy. On change:
init-proxy and caddy restart, and siphon-pbx restarts.
SIPHON_PBX_HTTP_PORT¶
The host port Caddy's plain HTTP (redirects and ACME challenges) is published on.
- Default: 80. Layers: tls. Read by: Docker Compose. On change: caddy restarts.
SIPHON_PBX_HTTPS_PORT¶
The host port Caddy's HTTPS is published on.
- Default: 443. Layers: tls. Read by: Docker Compose. On change: caddy restarts.
SIPHON_PBX_SIPS_PORT¶
The host port Caddy takes phones' SIP over TLS on.
- Default: 5061. Layers: tls. Read by: Docker Compose. On change: caddy restarts.
SIPHON_PBX_SIP_TLS_UPSTREAM_PORT¶
The port of siphon-sip's internal TLS listener Caddy re-encrypts phones' SIP onto. It must match the port
in SIPHON_PBX_SIP_TLS_LISTEN.
- Default: 5061; 5062 in tls-host. Layers: tls-host. Read by: caddy (the rendered Caddyfile). On change:
caddy restarts.
SIPHON_PBX_TURN_TLS_UPSTREAM¶
Where Caddy forwards the decrypted turns: stream: siphon-rtp's TURN TCP listener. A placeholder in the render, expanded
from Caddy's own environment, and only rendered when SIPHON_PBX_TURN_TLS_HOSTNAME is set.
- Default: siphon-pbx:3478; <SIPHON_PBX_SIP_ADDRESS>:3478 in turns-host. Layers: turns-host. Read by: caddy (the
rendered Caddyfile). On change: caddy restarts.
SIPHON_PBX_SIP_WS_UPSTREAM_PORT¶
The port of siphon-sip's WebSocket listener Caddy proxies a browser's upgrade on /sip to. It must match
the port in SIPHON_PBX_SIP_WS_LISTEN.
- Default: 5080. Layers: tls. Read by: caddy (the rendered Caddyfile), through compose. On change: caddy restarts.
Voice runtime¶
SIPHON_PBX_VOICE_RUNTIME_URL¶
Where the deployment's own voice runtime serves its media WebSocket. Set by voice and nothing else, which
is what makes the deployment's own bots opt in. Needs SIPHON_PBX_VOICE_RUNTIME_TOKEN_FILE.
- Default: unset (no hosted bot can be created); ws://<internal address>:<runtime port>/voice in voice.
Layers: voice. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_VOICE_RUNTIME_PORT¶
The port the voice runtime listens on.
- Default: 9101. Layers: voice. Read by: voice-runtime, siphon-pbx and telephony-ready, through compose.
On change: voice-runtime and siphon-pbx restart.
SIPHON_PBX_VOICE_RUNTIME_LOG_LEVEL¶
The voice runtime's log level.
- Default: info. Layers: voice. Read by: voice-runtime. On change: voice-runtime restarts.
SIPHON_PBX_VOICE_LOCAL_MODELS¶
1 builds the voice runtime image with the speech and language models that run on the machine itself; 0
leaves them out, so bots need hosted providers. deploy/deploy-remote.sh reads it from the server's .env
to build the matching image.
- Default: 0. Layers: voice (a build argument). Read by: the voice-runtime image build. On change: rebuild
the voice-runtime image.
TURN relay¶
siphon-rtp's built-in TURN server, for a browser phone behind a network that blocks UDP media. The turn
layer starts it (--turn-udp and --turn-tcp on 3478, never --turn-permit-private-peers) and tells siphon-pbx
the secret and the URIs; each node writes its URIs into the instance registry with its heartbeat, and a signed-in
user's GET /api/v1/webrtc/ice-servers answers one ice_servers entry per distinct set of live nodes' URIs,
under a credential <expiry>:m-<user id> good for SIPHON_PBX_TURN_CREDENTIAL_TTL_SECS. Without a relay the
list is empty. turns: on 443 through the TLS proxy is SIPHON_PBX_TURN_TLS's, below.
SIPHON_PBX_TURN_URIS¶
The URIs a browser reaches this node's relay at, comma-separated: stun:, turn: or turns:, a host, an
optional port and an optional ?transport=udp or ?transport=tcp. In YAML a list, turn.uris. Needs
SIPHON_PBX_TURN_SECRET_FILE. Blank is unset.
- Default: unset; in turn, the relay on SIPHON_PBX_SIP_ADDRESS and SIPHON_PBX_TURN_PORT, over UDP and over
TCP. Layers: turn. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_TURN_CLUSTER_PEERS¶
The other nodes' media the relay may also reach, for a deployment whose TURNS name resolves to several nodes: a browser's
allocation can land on a node that does not hold its call's media, and siphon-rtp's default (--turn-peers own-media)
refuses that with a 403 on CreatePermission. Comma-separated <ip>:<port-min>-<port-max> entries, each node's advertised
media address (SIPHON_PBX_SIP_ADDRESS) and its media window, this node's own included (harmless, so one value can be
shared by every node). An IP or CIDR with no range takes this node's own window. Passed to siphon-rtp as
SIPHON_RTP_TURN_CLUSTER_PEERS. Blank or whitespace is unset: the relay reaches its own media only, and siphon-rtp starts
normally. Entries are trimmed. siphon-rtp refuses to start on an empty element or a trailing comma, a hostname (an
address only), port 0, a minimum above the maximum, a network wider than an IPv4 /16 or an IPv6 /48, and a non-empty list
beside --turn-peers denylist. A relayed packet is checked against the entry's address and its port range, so listing a
node opens none of its other ports.
- Default: unset. Layers: turn, turn-host, turns-only, turns-only-host. Read by: siphon-rtp, through compose. On change:
siphon-rtp restarts.
SIPHON_PBX_TURN_TLS¶
true serves turns: (TURN over TLS) on every organisation's own host, on the port its WebSocket address uses (443):
a browser is handed turns:<the host it opened /sip on>:443?transport=tcp, filled in per answer (the ice-servers
route and a web call's token answer), beside any SIPHON_PBX_TURN_URIS, or alone when that is blank, which is the
turns-only layer. No name, DNS record or certificate of its own: the proxy's 443 becomes a layer4 server that
terminates the TLS with the host's own certificate, sends a STUN/TURN stream to siphon-rtp's TURN listener on 3478
behind a PROXY v2 header naming the browser (siphon-rtp 0.30.3 reads it from the proxy's address only, set by the
layer, so its allocation, limits and logs carry the browser's own address) and everything else to the HTTPS site on
loopback behind a PROXY v2 header. Needs SIPHON_PBX_TURN_SECRET_FILE. Keep 443/tcp open; in the turns-only layer 3478 is neither
published nor listening on UDP. YAML: turn.tls.
- Default: false; true in turns and turns-only. Layers: turns, turns-only. Read by: siphon-pbx and init-proxy.
On change: siphon-pbx restarts and the proxy takes a new render.
SIPHON_PBX_TURN_CREDENTIAL_TTL_SECS¶
How long a credential is good for, from 60 to 86400. A shorter one limits what a leaked credential is worth; the
browser asks for a new one for each call. YAML: turn.credential_ttl_secs. Blank is unset.
- Default: 3600. Layers: turn. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_TURN_PORT¶
The host port the relay is published on, for UDP and TCP, in the published-port shape: it is 3478 inside the
shared namespace whatever this says. Name the same port in SIPHON_PBX_TURN_URIS if you set both. Ignored in the
host-namespace shape, where the relay binds 3478 itself. Open it in the host's firewall.
- Default: 3478. Layers: turn. Read by: Docker Compose. On change: the shared namespace is recreated.
Microsoft Teams Direct Routing¶
The teams layer turns these on. Without it they are unset and nothing about the deployment changes.
SIPHON_PBX_TEAMS_SBC_FQDN¶
The SBC's base FQDN: the carrier trunk Microsoft probes, and what every organisation's derived trunk is a subdomain of. Setting it makes the deployment a Direct Routing SBC. - Default: unset (off); required in teams. Layers: teams. Read by: siphon-pbx and init-telephony. On change: siphon-pbx restarts and siphon-sip re-render (a restart).
SIPHON_PBX_TEAMS_CERTIFICATE_DIR¶
The directory holding fullchain.pem and privkey.pem for the base FQDN and its wildcard, mounted into
siphon-sip at the same path.
- Default: none; required in teams. Layers: teams. Read by: siphon-pbx, init-telephony, and Docker Compose
(the mount). On change: siphon-sip re-render (a restart).
SIPHON_PBX_TEAMS_PORT¶
The port of the Teams listener, which is the trunk's -SIPSignalingPort. Published as is.
- Default: 5068. Layers: teams. Read by: siphon-pbx, init-telephony and Docker Compose. On change: the
shared namespace is recreated.
SIPHON_PBX_TEAMS_BIND¶
A host address prefix for the published Teams port, such as 127.0.0.1:. Test runs set it; a deployment
leaves it empty, because Microsoft reaches the port from outside.
- Default: empty. Layers: teams. Read by: Docker Compose. On change: the shared namespace is recreated.
SIPHON_PBX_TEAMS_SIGNALLING_NETWORKS¶
The networks Microsoft's SIP proxies send from, comma-separated: trusted, and exempt from the abuse
controls.
- Default: Microsoft's published ranges, 52.112.0.0/14, 52.120.0.0/14, 2603:1063:400::/40. Layers:
teams. Read by: siphon-pbx and init-telephony. On change: siphon-sip re-render.
SIPHON_PBX_TEAMS_PROXIES¶
Microsoft's SIP proxies as comma-separated host:port, in the order they are tried. Overridden only to
point the end-to-end test at a fake.
- Default: Microsoft's three published Direct Routing proxies on 5061 (TEAMS_PROXIES in
crates/siphon-pbx-core/src/config.rs). Layers: teams. Read by: siphon-pbx and init-telephony. On change:
siphon-pbx restarts and siphon-sip re-render.
SIPHON_PBX_TEAMS_SERVER_CA¶
A PEM bundle of the authorities Microsoft's proxies' certificates chain to, as siphon-sip sees it. Set, siphon-sip verifies every proxy it dials or probes; unset, those connections are encrypted but not authenticated. - Default: unset. Layers: teams. Read by: siphon-pbx and init-telephony. On change: siphon-sip re-render.
IMS (ISC)¶
SIPHON_PBX_ISC_TRUSTED_SOURCES¶
The addresses or networks the S-CSCFs send from, comma-separated. A call's P-Served-User is believed only
from these; they are also exempt from the abuse controls. Needs SIPHON_PBX_SIP_ADDRESS. Unset, there is
no S-CSCF.
- Default: unset. Layers: telephony. Read by: siphon-pbx and init-telephony. On change: siphon-pbx restarts
and siphon-sip re-render.
SIPHON_PBX_ISC_UNKNOWN_SERVED_USER¶
What a call an S-CSCF hands over for a served user no organisation has bound becomes: reject (404) or
continue (sent back to the S-CSCF unchanged).
- Default: reject. Layers: telephony. Read by: siphon-pbx. On change: siphon-pbx restarts.
IMS (XCAP)¶
The XCAP server an IMS front-end changes an IMS line's call forwarding through (RFC 4825, with the simservs
document of TS 24.623). It is a listener of its own, never the web one, so nothing here is on the internet-facing
side, and every node serves it. Unset, nothing is served. Setting the listener requires the other two settings:
each of the three is refused, naming its variable, when the others are missing.
SIPHON_PBX_XCAP_LISTEN¶
The address and port the XCAP server listens on. Nothing in the compose layers publishes it: a deployment that sets it publishes the port on the network its front-end reaches, and on no other. - Default: unset. Layers: base. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_XCAP_TRUSTED_SOURCES¶
The addresses or networks the front-end connects from, comma-separated. A connection from anywhere else is
answered 403 before anything is read. Required once SIPHON_PBX_XCAP_LISTEN is set; an empty list, a network
that does not parse, or one holding every address stops siphon-pbx at start. Set without the listener, it is
refused rather than ignored.
- Default: unset. Layers: base. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_XCAP_TOKEN_FILE¶
A file holding the bearer token the front-end presents on every request (one word of printable characters),
compared in constant time. Required once SIPHON_PBX_XCAP_LISTEN is set. An unreadable or empty file stops
siphon-pbx at start.
- Default: unset. Layers: base. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_XCAP_TLS_CERT_FILE¶
A PEM certificate chain for the XCAP listener. Set together with SIPHON_PBX_XCAP_TLS_KEY_FILE, the listener
speaks TLS (1.2 and 1.3, HTTP/1.1) and a plain-text client is refused; neither set, it speaks plain HTTP, as
before. One without the other, or either without SIPHON_PBX_XCAP_LISTEN, is refused naming its variable. A
missing or non-PEM file stops siphon-pbx at start. The source and token checks apply with TLS on exactly as
without it.
- Default: unset. Layers: base. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_XCAP_TLS_KEY_FILE¶
The PEM private key for SIPHON_PBX_XCAP_TLS_CERT_FILE. Needed with it and refused without it. A missing or
non-PEM file, or a key that does not go with the certificate, stops siphon-pbx at start.
- Default: unset. Layers: base. Read by: siphon-pbx. On change: siphon-pbx restarts.
SIPHON_PBX_XCAP_TLS_CLIENT_CA_FILE¶
A PEM bundle of certificate authorities. Set, the front-end must present a client certificate that chains to one of them (mutual TLS), or its handshake fails before anything is read. Needs the two settings above; set without them it is refused rather than ignored. An unreadable file or one holding no certificate stops siphon-pbx at start. - Default: unset. Layers: base. Read by: siphon-pbx. On change: siphon-pbx restarts.
Branding, voice bot and operator tokens (one-shots)¶
These are read by compose services that never start with up; each is run by name with
docker compose run --rm <service>. Nothing needs restarting afterwards except where noted.
SIPHON_PBX_BRAND_DIR¶
The host directory holding brand.yaml and the files it names, mounted read-only into brand-apply.
- Default: ./brand beside the compose files. Layers: base. Read by: Docker Compose (brand-apply).
SIPHON_PBX_BRAND_OPERATOR¶
The email of the operator the brand change is recorded against. Must already exist.
- Default: none, required. Layers: base. Read by: brand-apply. When the SIP product changes, run
docker compose up -d again so siphon-sip re-render carries it.
SIPHON_PBX_VOICE_BOT_DIR¶
The host directory holding voice-bot.yaml and the secret file it names, mounted read-only into
voice-bot-apply.
- Default: ./voice-bot beside the compose files. Layers: base. Read by: Docker Compose
(voice-bot-apply).
SIPHON_PBX_VOICE_BOT_PRIVATE_NETWORKS¶
Private networks a voice bot may be reached on over plain ws://, as comma-separated CIDRs, each inside
10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10 or fc00::/7. A bot's address must then
be an IP address written out inside one of them, never a name. Anything else (a public range, /0,
link-local, a typo) stops siphon-pbx and voice-bot-apply at start. Over ws:// every caller's voice and
the bot's secret cross that network in clear text. See docs/architecture.md (A bot on a private network).
- Default: unset (a bot needs wss://, or ws:// to loopback). Layers: base. Read by: siphon-pbx and
voice-bot-apply, the same value for both. On change: siphon-pbx restarts.
SIPHON_PBX_VOICE_BOT_OPERATOR¶
The email of the operator the voice-bot change is recorded against. Must already exist. - Default: none, required. Layers: base. Read by: voice-bot-apply.
SIPHON_PBX_ANNOUNCEMENT_ENDPOINT_DIR¶
The host directory holding announcement-endpoint.yaml and the signing-secret file it names, mounted read-only
into announcement-endpoint-apply.
- Default: ./announcement-endpoint beside the compose files. Layers: base. Read by: Docker Compose
(announcement-endpoint-apply).
SIPHON_PBX_ANNOUNCEMENT_ENDPOINT_OPERATOR¶
The email of the operator the announcement-endpoint change is recorded against. Must already exist. - Default: none, required. Layers: base. Read by: announcement-endpoint-apply.
SIPHON_PBX_RECORDING_DELIVERY_DIR¶
The host directory holding recording-delivery.yaml and the token and signing-secret files it names, mounted
read-only into recording-delivery-apply.
- Default: ./recording-delivery beside the compose files. Layers: base. Read by: Docker Compose
(recording-delivery-apply).
SIPHON_PBX_RECORDING_DELIVERY_OPERATOR¶
The email of the operator the recording-delivery change is recorded against. Must already exist. - Default: none, required. Layers: base. Read by: recording-delivery-apply.
SIPHON_PBX_RETENTION_DIR¶
The host directory holding retention.yaml, mounted read-only into retention-apply.
- Default: ./retention beside the compose files. Layers: base. Read by: Docker Compose (retention-apply).
SIPHON_PBX_RETENTION_OPERATOR¶
The email of the operator the retention change is recorded against. Must already exist. - Default: none, required. Layers: base. Read by: retention-apply.
SIPHON_PBX_OPERATOR_CREATE_EMAIL¶
The address of an operator to create without the console, with no password: it cannot sign in (until
reset-password --operator gives it one) and exists to own operator tokens. Idempotent by address, so it can run
every time; recorded in the audit log. Works with or without SIPHON_PBX_SINGLE_ORGANISATION, which has no console to
create one in.
- Default: none, required. Layers: base. Read by: operator-create (docker compose run --rm operator-create).
SIPHON_PBX_OPERATOR_CREATE_NAME¶
The name of that account.
- Default: operator. Layers: base. Read by: operator-create.
SIPHON_PBX_OPERATOR_TOKEN_OPERATOR¶
The email of the operator an issued token acts as. - Default: none, required. Layers: base. Read by: operator-token.
SIPHON_PBX_OPERATOR_TOKEN_SCOPES¶
The token's scopes, comma-separated, such as organisations:read,organisations:write.
- Default: none, required. Layers: base. Read by: operator-token.
SIPHON_PBX_OPERATOR_TOKEN_DAYS¶
The token's lifetime in days, at most 365.
- Default: 90. Layers: base. Read by: operator-token.
SIPHON_PBX_OPERATOR_TOKEN_DIR¶
The host directory the token file is written into.
- Default: ./operator-token beside the compose files. Layers: base. Read by: Docker Compose
(operator-token).
SIPHON_PBX_OPERATOR_TOKEN_FILE¶
The token file's name in that directory, created with mode 0600. An existing file is refused.
- Default: operator-token. Layers: base. Read by: operator-token.
Tests and end-to-end runs only¶
None of these belongs in a deployment.
SIPHON_PBX_TEST_DATABASE_URL¶
A Postgres URL for a role allowed to create databases, for the tests behind the postgres-tests feature.
- Default: unset (those tests cannot run). Read by: cargo test (siphon-pbx-core, -control, -api).
SIPHON_PBX_WRITE_FIXTURES¶
Set, the contract tests rewrite the generated fixtures they compare against instead of failing.
- Default: unset. Read by: cargo test (siphon-pbx-flow and siphon-pbx-api contract tests).
SIPHON_PBX_SIMSERVS_XSD_DIR¶
The directory holding the ETSI simservs schema simservs_xmllint validates the rendered document against with
xmllint. The schemas are not in the repository; without them the checks that need one print NOT RUN and pass.
- Default: tests/fixtures/simservs/xsd/ in the core crate. Read by: the core crate's tests.
SIPHON_PBX_E2E_PROJECT¶
The compose project name, and image tag, an end-to-end script uses, so runs can share a Docker host.
- Default: per script (siphon-pbx-e2e, siphon-pbx-tls-e2e, siphon-pbx-teams-e2e,
siphon-pbx-ims-e2e). Read by: deploy/e2e/*.sh, set per run by CI.
SIPHON_PBX_E2E_TURN_MODE¶
mixed or tls: which TURN door deploy/e2e/browser.sh runs its stack with. mixed is the turn and turns layers
(turn: on 3478 beside turns: on the organisation's host), and adds a browser given the turns: URI alone; tls is the turns-only layer.
- Default: mixed. Read by: deploy/e2e/browser.sh, tls set by the turns-only CI job.
SIPHON_PBX_E2E_PART¶
<part>/<parts>, for example 2/3: telephony.sh runs only that part of its scenarios, each part on a stack of its own.
- Default: unset (every scenario, in order). Read by: deploy/e2e/telephony.sh, set per job by CI.
SIPHON_PBX_E2E_ADDRESS¶
Forces the /24 of 127.0.0.0/8 a host-namespace telephony.sh run takes, instead of picking a free one.
- Default: unset (picked). Read by: deploy/e2e/telephony.sh.
SIPHON_PBX_E2E_DNS_ADDRESS¶
The address of the end-to-end suite's own DNS server, which telephony.sh reads from Docker and exports
so the stack resolves through it. Set by the script, never by hand.
- Default: a placeholder that only lets the compose layer load. Read by: deploy/e2e/docker-compose.srv-dns.yml.
SIPHON_PBX_E2E_SIPHON_SIP_IMAGE¶
A siphon-sip image for ims.sh to run instead of the pinned one.
- Default: unset (the pinned image). Read by: deploy/e2e/ims.sh.
SIPHON_PBX_E2E_REGISTRAR¶
valkey runs cluster.sh's two nodes with siphon-sip's registrar in one Valkey over TLS, with a password
and a private CA; memory keeps it in memory, and the restart step then shows nothing is kept.
- Default: memory. Read by: deploy/e2e/cluster.sh, set per job by CI.
SIPHON_PBX_E2E_PREBUILT_IMAGE¶
A siphon-pbx image an earlier job already built, which the end-to-end scripts tag as the run's own instead of
building it again. It must be loaded; a missing one fails the run rather than falling back to a build.
- Default: unset (each script builds). Read by: deploy/e2e/build_once.sh, set per job by CI.
SIPHON_PBX_E2E_STALE_AFTER¶
How old an end-to-end project must be before teardown.sh removes it as abandoned.
- Default: 2h. Read by: deploy/e2e/teardown.sh.
SIPHON_PBX_BINARY¶
The siphon-pbx binary mcp.sh starts.
- Default: target/debug/siphon-pbx. Read by: deploy/e2e/mcp.sh.