Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 34 additions & 3 deletions switchboard/CHANGELOG-ARCHIVE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,36 @@
Earlier Switchboard releases, newest first. The most recent ones are in
[CHANGELOG.md](CHANGELOG.md).

## 0.117.0

**An alert Home Assistant could not accept is posted once it answers.**

- The link-health and device-health monitors raise each alert once, when a
state changes: the cordless goes critical, the phones become unreachable, the
outside line drops. When Home Assistant refused the notification, the alert
was lost. On 2026-11-07 a host reboot left Home Assistant Core unanswered for
twelve minutes while the add-on was already running, and three alerts
(cordless critical, all phones dropped briefly, cordless recovered) were
refused and never shown. The phones recovered inside that window; a phone
that went down during it and stayed down would have raised no alert at all.
- A refused alert is now kept and posted at the start of each later cycle of
the monitor that raised it (by default every 2 minutes for device health and
every 5 for link health). It is dropped only if Home Assistant refuses a retry
of it more than an hour after it was raised, so every alert gets at least one
retry of its own whatever the poll interval. A late post says so, and gives
the time it was written.
- A newer alert with the same `notification_id` replaces a kept one, as Home
Assistant itself does, so a stale "critical" never lands after its
"recovered". The message that replaces it names the alerts that were never
shown: the first, how many came between, and the latest three. An alert that
was dropped is still named by the next alert for the same device or line, for
12 hours.
- The "wake-up not delivered" card, which is posted when the critical push
cannot be sent, is retried the same way. The push itself is not: an alarm
that failed should not sound an hour later. Call-quality cards are not
retried, since each call's recorder runs once and exits; their
`notify_status` still records `failed`. The missed-wake-up notification keeps
the retry it has had since the 2026-10-04 power cut.
## 0.116.0

**Each call-quality score is judged against its own stream; loss alerts at
Expand Down Expand Up @@ -1165,7 +1195,7 @@ things came back.

**A caller's telephone number could reach the shared folder unmasked.** Numbers
are masked down to their last four digits before being written to the folder
that is visible outside the phone system and captured in backups — because most
that is visible outside the phone system and captured in backups — because some
of those numbers belong to people who never chose to be in this system. The
mask only applied if the number was all digits, and a number can arrive with a
leading `+`. The same number therefore leaked or was masked depending on how
Expand Down Expand Up @@ -2102,8 +2132,9 @@ On a trunk call the call-quality record has no extension to store, so it stores
the number instead: the caller's on the way in, the dialled digits on the way
out. That record is mirrored to the shared folder, which is readable from
outside the add-on and included in backups. Forty-five of the last 252 calls had
a complete number in them. Most belong to people who rang this house and had no
say in the matter.
a complete number in them. Ten belong to people who rang this house and two are
numbers it dialled, none of whom had any say in the matter; 32 of the
remaining 33 were the household's own caller ID.

The mirror now keeps only the last four digits; the private copy, which cannot
be read from outside, still holds the number in full. The mirror was made
Expand Down
67 changes: 35 additions & 32 deletions switchboard/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,42 @@
# Changelog

Recent releases. Releases up to 0.116.0 are in the
Recent releases. Releases up to 0.117.0 are in the
[changelog archive](https://github.com/tesseractAZ/Switchboard/blob/main/switchboard/CHANGELOG-ARCHIVE.md).

## 0.128.0

**The web terminal listens on an IPv6 address; comments left behind by the
documentation pass are corrected.**

- **`console_web_bind` can be an IPv6 address** (`::1`, or `[::1]`). The
terminal's server opened an IPv4 socket whatever the address, so an IPv6 bind
failed before it listened and the service restarted over and over, while the
start-up log said it had started. It now opens an IPv6 socket for an IPv6
address, and the log writes it as `[::1]:8100`. A bind that fails for any
reason logs one line naming the address and the reason. A value that is blank
inside its brackets (`[]`) means `127.0.0.1`, as a blank value does, in the
start-up log as well as in the server. IPv4
binds, the default included, behave as before.
- Failed logins to the web terminal and the SSH console are still limited to
5 per address in 5 minutes, and an IPv6 network (`/64`) now also has a
ceiling of 30 in that time, since one host can pick a fresh address in it for
every try. Only attempts their own address was allowed count toward it, and
a correct password takes its attempt back, so a device on the same LAN
retrying a stale password locks out only itself, and devices signing in
never use the ceiling up. An
IPv4 client reached through a dual-stack `::` bind counts as its IPv4
address. IPv4 clients are counted as before.
- Code comments, test notes, the operator-console reference and two changelog
archive entries that still repeated claims the 0.127.0 documentation pass
corrected now match the code: the console's footer order, what a mistyped
resize message would have done, the outside line not being the emergency path,
the cordless battery rule, how announce and wake-up delivery records are named
and joined, and whose telephone numbers the call-quality ledger held.
PERFORMANCE.md no longer calls the 2026-09-01 outage the only one the system
has had.
- `tools/wp826.mjs login` (not part of the add-on image) no longer prints the
start of the session id.

## 0.127.0

**The documentation, checked against the code.**
Expand Down Expand Up @@ -382,34 +416,3 @@ Recent releases. Releases up to 0.116.0 are in the
id.
- Asterisk's log is now read just before each sample rather than after it, so
every drop counted was logged before the sample that judges it.

## 0.117.0

**An alert Home Assistant could not accept is posted once it answers.**

- The link-health and device-health monitors raise each alert once, when a
state changes: the cordless goes critical, the phones become unreachable, the
outside line drops. When Home Assistant refused the notification, the alert
was lost. On 2026-11-07 a host reboot left Home Assistant Core unanswered for
twelve minutes while the add-on was already running, and three alerts
(cordless critical, all phones dropped briefly, cordless recovered) were
refused and never shown. The phones recovered inside that window; a phone
that went down during it and stayed down would have raised no alert at all.
- A refused alert is now kept and posted at the start of each later cycle of
the monitor that raised it (by default every 2 minutes for device health and
every 5 for link health). It is dropped only if Home Assistant refuses a retry
of it more than an hour after it was raised, so every alert gets at least one
retry of its own whatever the poll interval. A late post says so, and gives
the time it was written.
- A newer alert with the same `notification_id` replaces a kept one, as Home
Assistant itself does, so a stale "critical" never lands after its
"recovered". The message that replaces it names the alerts that were never
shown: the first, how many came between, and the latest three. An alert that
was dropped is still named by the next alert for the same device or line, for
12 hours.
- The "wake-up not delivered" card, which is posted when the critical push
cannot be sent, is retried the same way. The push itself is not: an alarm
that failed should not sound an hour later. Call-quality cards are not
retried, since each call's recorder runs once and exits; their
`notify_status` still records `failed`. The missed-wake-up notification keeps
the retry it has had since the 2026-10-04 power cut.
2 changes: 1 addition & 1 deletion switchboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,4 @@ LABEL \
org.opencontainers.image.title="Switchboard" \
org.opencontainers.image.description="Asterisk PBX for analog home phones" \
org.opencontainers.image.source="https://github.com/tesseractAZ/Switchboard" \
io.hass.version="0.127.0"
io.hass.version="0.128.0"
4 changes: 2 additions & 2 deletions switchboard/PERFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ not, and calling the detector "exercised" — as a first draft of this section d
transitions are recoveries from the 27 restarts; 100 of the 174 predate the first
restart carrying the flag.

The one fleet outage this system is known to have had — all eight ports dropping
A fleet outage — all eight ports dropping
from 01:00:07 MST on 2026-09-01 and all back by 01:02:06, 119 seconds from first
drop to last recovery — falls **inside** this file's window, at
08:00 UTC. It is absent because it fell entirely between two five-minute samples:
Expand Down Expand Up @@ -363,7 +363,7 @@ quiet because the system is healthy or because they cannot fire.
| Assistant health | — | No ledger before 0.80.0 (§4). |
| Emergency notice (`911`, `933`) | 2 calls | **Both verified by hand** 2026-09-06, one per handset family: `911` from a wired FXS port (`PJSIP/12`), `933` from the WiFi cordless (`PJSIP/19`). Each ran its whole block — Answer, `SW_TAG=emergency`, `sw-no-emergency.ulaw`, `Congestion(5)` — and wrote an `emergency`-tagged row, with no WARNING, ERROR or NOTICE anywhere in either window. |
| Fleet drop (between samples) | 0 | Shipped 0.79.0. Its input half runs (174 transitions read); its deciding half has never seen a candidate — all 174 were recoveries (§2). |
| Fleet outage (point sample) | 0 | Needs the outage on two consecutive samples, so it cannot see one shorter than a single poll interval (300 s by default) and is certain to see one only from two intervals. The one real outage lasted 119 s. |
| Fleet outage (point sample) | 0 | Needs the outage on two consecutive samples, so it cannot see one shorter than a single poll interval (300 s by default) and is certain to see one only from two intervals. The outage in this file's window lasted 119 s. |
| Poor-call alert | 11 legs | Fired, but not on every leg it should have. Until 0.104.0 a wake-up, page or announcement leg whose clip played could cross the MES, loss or round-trip threshold and raise nothing; a later pass over 50 days of the ledger found 5 such legs. From 0.104.0 those legs alert like any other. A truncated page or announcement still raises nothing; a truncated wake-up raises its own `undelivered` alert. |
| Round-trip threshold | 0 | **Could not fire.** Tested against `rtt_ms`, whose maximum across all 244 legs is 311.66 ms, against a 400 ms threshold — while `rtt_max_ms` in the same records reaches 845.93 ms. Fixed in 0.77.0: it now alerts on `rtt_mean_ms` above 250 ms or `rtt_max_ms` above 500 ms, and applies the 400 ms test to `rtt_ms` only when neither is recorded. |
| Unanswered-leg media gate | 2 legs | **Verified in BOTH directions** 2026-09-06. It skips when it should: two unanswered legs since it shipped, both routed to `no-media`, and the last media warning anywhere in the log is still 13:17:35 — the final unanswered call before the fix. It also does *not* skip when it shouldn't: on the answered `933` call the gate evaluated `GotoIf("0?nomedia")`, fell through, and read `RXC=621 TXC=621` over 12 s (≈52 packets/s, close to the 50 packets/s expected at 20 ms ptime). That second half is the one worth having, because a gate stuck permanently open produces the same zero-warning reading while silently discarding every call's RTP telemetry. |
Expand Down
4 changes: 3 additions & 1 deletion switchboard/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,9 @@ every SSH login needs a password:
Since v0.125.0 the web terminal fails closed the same way: without a valid
row it does not start.
- **A per-address throttle, charged before the password is checked**: 5 attempts
per address in any 300 s. It is the web terminal's rule, with a separate count.
per address in any 300 s, and for IPv6 also 30 per `/64` in that time, which
one host rotating through addresses meets (since v0.128.0).
It is the web terminal's rule, with a separate count.
A connection also gets at most 3 password attempts.
- **Caps before the handshake**: at most 16 connections in total and 4 per
address, applied when the TCP connection arrives, before the SSH version
Expand Down
2 changes: 1 addition & 1 deletion switchboard/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Switchboard
version: "0.127.0"
version: "0.128.0"
slug: switchboard
description: >-
Instrumented Asterisk 20 PBX for analog house phones on a Grandstream GXW4216
Expand Down
2 changes: 1 addition & 1 deletion switchboard/docs/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ unless noted; leaving it at its default is fine.
| `console_enabled` | `true` | The SSH operator console (ring/connect/hang up; see [The operator console](operator-console.md)). Password login only, against `console_users`; while that list has no valid entry, **every login is refused**. Turning it off stops SSH only: the sidebar console and the web terminal keep working. With this and `console_web_enabled` both off, the board itself stops and the sidebar console shows "unavailable". |
| `console_port` | `2300` | TCP port of the SSH console. The sidebar console and the web terminal do not use it. |
| `console_users` | `[]` | Sign-in accounts for the **SSH console** and the **web terminal** — each entry has `username` and `password` (masked); a row missing either is ignored. SSH accepts only these accounts and refuses every login while the list is empty. With the list empty the web terminal does not start (since 0.125.0; before, it ran with no login); when any user is configured, its page **and its WebSocket** require a signed-in session. Repeated wrong attempts from one address are throttled (5 per 5 minutes, counted separately by SSH and the web terminal). The sidebar console needs none of this. |
| `console_web_bind` | `127.0.0.1` | Interface the web terminal listens on. Blank also means `127.0.0.1`; since 0.114.0 it no longer follows `console_bind`. The browser console is served through the Home Assistant sidebar instead ([The operator console](operator-console.md)), so this terminal does not need to be on your network. |
| `console_web_bind` | `127.0.0.1` | Interface the web terminal listens on: an IPv4 address, or since 0.128.0 an IPv6 one (`::1`, or `[::1]`). Blank also means `127.0.0.1`; since 0.114.0 it no longer follows `console_bind`. The browser console is served through the Home Assistant sidebar instead ([The operator console](operator-console.md)), so this terminal does not need to be on your network. |
| `console_web_enabled` | `true` | Browser version of the console (xterm.js), bound to loopback by default. It starts only when `console_users` has a valid entry (since 0.125.0) and then requires that sign-in. |
| `console_web_port` | `8100` | TCP port for the web terminal. |

Expand Down
8 changes: 5 additions & 3 deletions switchboard/docs/reference/operator-console.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ signals the Ingress dashboard surfaces. Three front-ends onto the same board:
0.100.0 **the board itself scrolls the same way**: the roster follows the
selection and says how many rooms are out of view. When the window is shorter
still, the active-call and wake-up lists collapse to a count of what they are
hiding — but the key bar at the bottom is never given up, which is what used to
happen first, because the page was simply cut off at the terminal's last row.
hiding — but the key bar is never given up. The page used to be cut off at the
terminal's last row, which took the status message first and the key bar just
above it soon after.
The window size comes from your SSH terminal and follows a resize. Toggle with
`console_enabled`; `console_port` and `console_bind` set its port and interface.
**Since 0.114.0 `console_bind` defaults to `0.0.0.0`** — on a *fresh* install;
Expand Down Expand Up @@ -76,7 +77,8 @@ signals the Ingress dashboard surfaces. Three front-ends onto the same board:
or X11 forwarding are all refused, and the connection closes when the console
is quit. A connection has 60 s to log in and is closed after 15 minutes without
input. Wrong passwords are throttled per address — 5 attempts in any 5 minutes,
at most 3 on one connection — separately from the web terminal's count. A
at most 3 on one connection, and over IPv6 also 30 per `/64` network — separately
from the web terminal's count. A
`console_users` entry holding a character an SSH client cannot send (a control
character, say) cannot log in over SSH; the start-up log counts such entries.
Recent OpenSSH clients warn that the connection "is not using a post-quantum
Expand Down
Loading