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
30 changes: 30 additions & 0 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.118.0

**The "phones dropped" card says only what is true of each phone it names.**

- The link-health monitor also catches a fleet that drops between two samples,
from Asterisk's log. Its card said the phones "came back before the next
health check" and were "up now, not a current outage" whenever enough phones
had gone Unreachable since the last sample, without looking at the sample it
was judged on. Twice that sample showed them down: 2026-11-02 01:01 MST
(08:01 UTC), the gateway's weekly reboot caught mid-reboot (8 wired ports
down), and 2026-11-07 19:06 MST (02:06 UTC on 11-08), a router reboot (all 9
phones down). Both fleets were back by the next sample.
- The card is now judged per phone against the sample. A "dropped briefly ...
up now" card is posted only when every phone that dropped is reachable in
it. Otherwise a "phones dropped" card is posted at once, naming the phones
still unreachable at that check, and a later check replaces it under the
same id: who was back, and who, if anyone, still was not. "Not a current
outage" is said only once every one of them is back and the sample is not a
fleet outage. Phones re-register one at a time, so a sample can show one to
three still down while the fleet is below the outage threshold; judged per
fleet, that read as healed.
- "All phones" and "nothing was reachable" are said only when every
registered phone dropped. The threshold is half the fleet, and a phone that
stayed up (often the cordless, which the outside line rings) kept working.
- If the phones stay down, the outage alert ("phones unreachable") follows as
before and the card says so when the outage threshold is met. A second drop
while a card is open gets a card of its own; each is updated under its own
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.**
Expand Down
69 changes: 37 additions & 32 deletions switchboard/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,44 @@
# Changelog

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

## 0.129.0

**A wake-up can be cancelled when the phone line turns "cancel" into a
sound-alike, and a call that understood nothing says the wake-up is still set.**

- **A "cancel" that comes back as another word now cancels.** Telephone audio
loses most of an "s", and the recogniser wrote "cancel" as "Campbell." and
"Campful." on 2026-08-21 and as "Okay, I'm full." and "Campful." on
2026-11-23, the second time with the prompt hint added after the first in
place. Both times nothing matched and the wake-up being called off rang. When
a wake-up is set, a reply shaped like "cancel" (the whole reply, at most two
words besides fillers such as "okay") now cancels it, as the word does. With
no wake-up set it counts as not understood. Times are read first, as before.
Checked against 1,288 recordings of 28 synthetic voices sent through the same
8 kHz channel and recogniser: 535 of 560 spoken cancels now cancel (516
before), and none of the 728 spoken times and other replies becomes one.
- **A "don't" stops a cancel.** "I don't want to cancel" and "never mind, keep
it" used to cancel. A "don't", "not", "keep" or "leave" anywhere in the reply
now cancels nothing; the reply counts as not understood. An echo of the recogniser's own
prompt, which read as a cancel or as 6:53 PM, now does nothing.
- **A call that understood nothing ends with the wake-up that is still set.**
It used to end "No wake-up call was set", which was false whenever one was. It
now plays the recording that opens the call, "You already have a wake-up
call…", and the time.
- **Two kinds of reply no longer replace a wake-up with the wrong time.** A
zero with no other number after it ("Oh.", or whisper's "Oh, oh, oh." on
noise) was read as the hour 0 and set midnight. A length of time ("ten more
minutes", "one second") was read as that hour. Both now count as not
understood. "Oh seven hundred", "seven oh five", "zero zero thirty" and
"ten past seven" read as before.
- **A recording with no speech in it is not transcribed.** When nothing rose
above the silence threshold, whisper still answered something, and any
answer could act on the wake-up. The attempt now counts as a miss.
- **Each wake-up recording leaves a line in the log** with its length and why
it ended, never the words, as the operator's recordings already do.

## 0.128.0

**The web terminal listens on an IPv6 address; comments left behind by the
Expand Down Expand Up @@ -385,34 +421,3 @@ documentation pass are corrected.**
means only reachable but not yet measured. Units and `state_class` do not
change.
- A failed push no longer names its target in the add-on log.

## 0.118.0

**The "phones dropped" card says only what is true of each phone it names.**

- The link-health monitor also catches a fleet that drops between two samples,
from Asterisk's log. Its card said the phones "came back before the next
health check" and were "up now, not a current outage" whenever enough phones
had gone Unreachable since the last sample, without looking at the sample it
was judged on. Twice that sample showed them down: 2026-11-02 01:01 MST
(08:01 UTC), the gateway's weekly reboot caught mid-reboot (8 wired ports
down), and 2026-11-07 19:06 MST (02:06 UTC on 11-08), a router reboot (all 9
phones down). Both fleets were back by the next sample.
- The card is now judged per phone against the sample. A "dropped briefly ...
up now" card is posted only when every phone that dropped is reachable in
it. Otherwise a "phones dropped" card is posted at once, naming the phones
still unreachable at that check, and a later check replaces it under the
same id: who was back, and who, if anyone, still was not. "Not a current
outage" is said only once every one of them is back and the sample is not a
fleet outage. Phones re-register one at a time, so a sample can show one to
three still down while the fleet is below the outage threshold; judged per
fleet, that read as healed.
- "All phones" and "nothing was reachable" are said only when every
registered phone dropped. The threshold is half the fleet, and a phone that
stayed up (often the cordless, which the outside line rings) kept working.
- If the phones stay down, the outage alert ("phones unreachable") follows as
before and the card says so when the outage threshold is met. A second drop
while a card is open gets a card of its own; each is updated under its own
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.
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.128.0"
io.hass.version="0.129.0"
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.128.0"
version: "0.129.0"
slug: switchboard
description: >-
Instrumented Asterisk 20 PBX for analog house phones on a Grandstream GXW4216
Expand Down
15 changes: 15 additions & 0 deletions switchboard/docs/reference/wake-ups-and-clock.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@ and reads it back before it hangs up. If it is wrong, dial the code again: it
reads out the time that is set and asks for a new one or "cancel". Say
"cancel" (or "clear", "never mind") to remove a pending wake-up.

**"Cancel" on a phone line.** Telephone audio loses most of an "s", and the
recogniser fills the gap with a word it knows: "cancel" has come back as
"Campbell", "Campful", "Pencil" and "Okay, I'm full". So when a wake-up is set,
a reply shaped like "cancel" cancels it as the word does. It must be the whole
reply, at most two words besides fillers such as "okay" or "please". With no
wake-up set, the same reply counts as not understood.
A spoken time is always read as a time first. Two kinds of reply are not
read as a time at all: a zero with no other number after it ("oh", "oh, oh,
oh"), which used to be midnight, and a length of time ("ten more minutes",
"one second"), which used to be that hour. A "don't", "not", "keep" or "leave"
anywhere in a reply cancels nothing, and a recording in which nothing rose
above the silence threshold is not sent to the recogniser. When a wake-up was
set and nothing was understood, the call ends by reading out the time it is
still set for.

- **One wake-up per room.** Setting a new one replaces the old.
- At the set time the room rings for `wakeup_ring_seconds` (default 60). Once
answered, the call fires the wake-up scene (if one is set), speaks a greeting
Expand Down
11 changes: 10 additions & 1 deletion switchboard/rootfs/usr/bin/switchboard-config
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,12 @@ def render_operator_context(joined: str, automation_on: bool = False,
def render_wakeup_context() -> list[str]:
"""The [wakeup] context (dial the code -> AGI sets/changes/cancels a wake-up,
then the dialplan reads it back) and [wakeup-deliver] (the scheduler service
originates the room INTO this to actually ring it at the chosen time)."""
originates the room INTO this to actually ring it at the chosen time).

WAKEUP_RESULT=kept means a wake-up was set, nothing the caller said was
understood, and it is still set: the call ends by reading it back with the
same recording that opened it (sw-wakeup-exists), not with sw-wakeup-none's
"No wake-up call was set", which on that path is the opposite of the truth."""
return [
";; ----- Wake-up calls -----",
"[wakeup]",
Expand All @@ -789,12 +794,16 @@ def render_wakeup_context() -> list[str]:
" same = n,NoOp(wakeup result=${WAKEUP_RESULT} epoch=${WAKEUP_EPOCH})",
" same = n,GotoIf($[\"${WAKEUP_RESULT}\" = \"set\"]?setdone)",
" same = n,GotoIf($[\"${WAKEUP_RESULT}\" = \"cancelled\"]?cancelled)",
" same = n,GotoIf($[\"${WAKEUP_RESULT}\" = \"kept\"]?kept)",
" same = n,Goto(none)",
f" same = n(setdone),Playback({prompt('sw-wakeup-set')})",
" same = n,SayUnixTime(${WAKEUP_EPOCH},,IMp)",
" same = n,Goto(bye)",
f" same = n(cancelled),Playback({prompt('sw-wakeup-cancelled')})",
" same = n,Goto(bye)",
f" same = n(kept),Playback({prompt('sw-wakeup-exists')})",
" same = n,SayUnixTime(${WAKEUP_EPOCH},,IMp)",
" same = n,Goto(bye)",
f" same = n(none),Playback({prompt('sw-wakeup-none')})",
f" same = n(bye),Playback({prompt('sw-goodbye')})",
f" same = n,Playback({prompt('sw-endtone')})",
Expand Down
Loading