Skip to content

Releases: tombruton87/TwoCans

v0.1.10 — move to another box

Choose a tag to compare

@tombruton87 tombruton87 released this 06 Oct 23:04

A household can now move house. Export the line, the phones, the people and
the rest as a zip, bring chosen pieces into a twocans running somewhere else
— a Synology, say — and its passwords travel sealed under a passphrase you
choose. The DSM window gains an Update button, the Synology package a proper
icon, and three edges found in a security pass are closed.

Added

  • Move to another box, on the System screen: export the sections a family
    would recognise — the line, the phones, the people, settings and rules,
    sounds, grown-ups, and call history with its recordings — as a zip of plain
    JSON and the files it names, and bring chosen ones into a twocans already
    running elsewhere. Passwords and keys are sealed under a passphrase you
    type and locked to the new box's own key when they arrive; leave it blank
    and they stay behind. Import shows what is inside before replacing
    anything. Grown-ups merge by email and your own account is left alone;
    settings merge, so the new box keeps its ports and address.
  • A rounded icon for the Synology package, drawn from the two-cans mark, in
    place of the flat square copied from the PWA icon.
  • An Update button in twocans' DSM window: when a newer release is out, it
    downloads its Synology package from GitHub, checks it's a newer twocans,
    and has DSM's Package Center install it — the new version reports how it
    went. And Update the app, when the app's images are behind the package.

Security

  • A return path could send someone off-site: back() dropped the scheme and
    host but let /\evil.com through, which browsers read as //evil.com.
    A return path is now a plain path on this site, or /.
  • Restoring a backup trusted GNU tar to refuse .. members. The archive's
    member list is now checked by twocans before anything is extracted: no
    absolute paths, no .., and no links of either kind.
  • The trigger URL (/hook/announce/…) and a person's hello link (/hello/…)
    are rate-limited per token — 12 a minute, and 10 uploads an hour — so a
    leaked link cannot page the house on repeat or fill the disk.

v0.1.9 — twocans' window in DSM

Choose a tag to compare

@tombruton87 tombruton87 released this 03 Oct 22:02

twocans gets a window of its own in DSM: how it's doing, the calls going on now, its phones to ring or pause, charts and recent calls, its phone line, what it takes, and its settings — HTTPS from DSM's own certificates among them — in eight languages. A watchdog starts parts that stop, and DSM's notifications say when something needs you.

All of it is in the Synology package — twocans-0.1.9-1.spk, attached below. Install it in Package Center → Manual Install, over an earlier one or fresh, then refresh DSM in your browser.

twocans' window in DSM

Open twocans from DSM's main menu. It's laid out like Synology's own apps, with a button that opens the app itself:

  • Overview — how twocans is, and each part of it; the address and ports; Restart and Run setup again; when a newer release is out (with its package to download); and a getting-started list that ticks itself off as you go.
  • Live calls — who's on the phone now, with whom and for how long, and a button to end a call.
  • Phones — each phone, online, offline or paused. Ring one with a test call; pause one, or all of them, for an hour, two, or until the morning.
  • Activity — calls a day over the last 30 days, the last 20 calls with their recordings to play, and calls all told.
  • Phone line — your provider, numbers and registration, what your router forwards, and twocans' own checks.
  • Resources — memory over the last day, processor and space for each part, and speech-to-text switched off or on.
  • Settings — the address, ports, time zone and speech-to-text model; HTTPS; the watchdog and notifications; which other DSM users may look (view only, without transcripts or recordings); an export of everything; and a new password for a locked-out Owner, shown once.
  • Logs — the setup log and each part's own, and a support report with private details taken out.

It follows DSM's language — English, German, French, Spanish, Dutch, Italian, Portuguese and Polish — or one chosen in its Settings.

HTTPS from DSM's certificates

Choose one of the Synology's own certificates — the Let's Encrypt one DSM keeps for your DDNS name, say — and twocans serves it, picks up DSM's renewals, and can take its name as its address. Face ID sign-in and adding twocans to a phone's home screen need one. DSM 7 keeps third-party packages out of its own Certificate settings, so twocans reads DSM's certificates (read only) and copies the one you choose.

Looking after itself

  • A watchdog starts a part again when it's stopped working for a minute and a half — three times in an hour at most, then it's left for you to look at.
  • DSM notifications, in DSM's own notification centre: a part that stopped, setup that didn't finish, the phone line no longer registering, a phone offline for a day, a certificate running out, a new release. DSM's notification tool only runs as root, so the package runs it through a short-lived container — switch them off in the window's Settings if you'd rather not.

Good to know

  • Pausing phones needs the app from 0.1.7 on. A Synology that's still running older app images says so, and gets it with Run setup again once newer images are published.
  • The package has run on one Synology so far (DSM 7.3.2) — reports welcome.
  • The translations would be all the better for a native speaker's read; corrections welcome.

Updating

From Package Center, install the new .spk over the old one. Elsewhere, nothing in this release changes twocans itself — ./twocans update is all it takes.

v0.1.8 — twocans on a Synology

Choose a tag to compare

@tombruton87 tombruton87 released this 03 Oct 19:24

twocans on a Synology: a package to install from Package Center, with a wizard for its questions, or the installer over SSH. Getting it there made call audio's ports movable, and the installer surer-footed on small machines.

Synology

The package — twocans-0.1.8-1.spk, attached below — installs from Package Center → Manual Install on DSM 7.2.1 or later, on a model that runs Container Manager. Its wizard asks the installer's questions, suggesting the Synology's own address and time zone, and ports that are free on it. twocans then appears in DSM's main menu, its ports in the firewall's list of applications, and its recordings, voicemails and backups in a new twocans shared folder (give yourself access in Control Panel → Shared Folder to browse it).

It isn't signed by Synology, so DSM warns before installing; if it refuses, allow it under Package Center → Settings → Trust Level → Any publisher. It has run on one Synology so far (DSM 7.3.2) — reports welcome. See synology/ for how it works.

Over SSH, the one-line installer knows a Synology too: run it with sudo, and it puts twocans on a storage volume, finds Docker in Container Manager, and says which ports to open in DSM's firewall.

Also new

  • Call audio's ports can move, as a whole, when something else holds part of 10000–10100 (a UniFi controller's 10001, say). The installer offers a free range, and Asterisk, Docker and the app's router instructions all follow — phones and providers are told the range on every call.
  • Ready-made answers: ./install.sh takes TWOCANS_LAN_IP, TWOCANS_TZ and the rest, for installs nobody's at the keyboard for.

Fixed

  • Times stamped by the app and checked by the database could be hours out where the two run in different time zones. The database now keeps the app's.
  • Speech-to-text no longer stops the install on a kernel that can't cap a container's processor use: it runs uncapped there.
  • A slow first start of the database no longer stops the install: it gets up to five minutes.
  • The folders for HTTPS certificates are made by the installer, as Docker on some machines won't make them itself.

Updating

./twocans update

Calls, settings and recordings carry over. Containers are recreated, as their settings changed; the call-audio range stays where it is unless something else holds part of it.

twocans v0.1.7

Choose a tag to compare

@tombruton87 tombruton87 released this 03 Oct 16:31

Many more phones — Yealink, Poly, Cisco and Fanvil, each with the settings it actually has — a line full of things to call, from games and the radio to Santa, diagnostics to send when a phone won't come online, and an installer that works on far more Linux, and says what to do when it can't.

Upgrading

./twocans update

The database updates itself. One thing to know: HT801 and HT802 adapters get new, child-friendly defaults the next time they fetch their settings — call waiting off, the hook no longer puts calls on hold, the adapter's own star codes off, SSH off and the *** menu locked, and the line set for your country (so a UK corded phone with a screen shows who's calling). Each can be changed back on the adapter's new Phone settings tab.

Models marked Untested were set up from their makers' documentation and haven't been tried on a real one yet — if you have one, the phone's Setup tab has a Download diagnostics button; attach the file to an issue and we'll get it working.

What's new

Many more phones — Yealink, Poly, Cisco and Fanvil — each with the settings it
actually has; a line full of things to call, from games and the radio to Santa;
diagnostics to send when a phone won't come online; and an installer that
works on far more Linux, and says what to do when it can't.

Added

  • Yealink desk phones: T31G, T33G, T42U/T42S, T43U, T44U/T44W, T46U,
    T48U/T48S, T53W, T54W, T57W and T58W
    (untested). Point the
    phone at twocans (the Setup tab has the steps) and it fetches its line,
    its message key ringing 700, the household's time and phonebook, and its
    speed-dial keys — the line keys after its own, named on its screen.
    Announcements are answered by themselves, and "Pick up to ring a
    grown-up" works. Its Phone settings: how loud it rings (fixed, so it can't
    be turned down to nothing — or left to the phone), call waiting, Do Not
    Disturb and call forwarding on the phone, its phonebook, key tones,
    whether the screen stays lit, a clock screen saver on the colour ones,
    and calls to an IP address.

  • A wallpaper of your own on a Yealink colour screen (T33G, T44U,
    T46U, T48U/T48S, T54W, T57W and T58W) — a family photo, a pet, a favourite drawing. Upload it on the
    phone's Phone settings tab: it's cropped to fill that screen exactly,
    stripped of where it was taken, and sent to the phone, whose key labels
    go part see-through over it. "Back to its own wallpaper" puts the
    built-in one back and deletes the picture. The phone fetches it behind
    the same password as its settings, and can fetch nothing but a phone's
    wallpaper that way.

  • More Yealink cordless bases: the W70B (up to 10 handsets) and the older
    W52P (up to 5)
    (untested), set up like the W60B, each with the settings
    it has. Adding a Yealink now picks the base, not the handset.

  • Yealink cordless phones: W56H handsets on a W60B base. Each handset
    is a phone of its own in twocans — up to eight on one base — and the base
    fetches everything from twocans: each handset's line, its name on screen,
    its message key, the household's time zone, and a phonebook of everyone it
    can call. Point the base at twocans once (the steps are on the phone's
    Setup tab); a base that asks before it's added shows up under "Found on
    your network". Handsets only answer an announcement by themselves when one
    is alone on its base, so they're rung like a call.

  • Yealink handsets answer announcements by themselves (W60B and W70B,
    firmware V85): with a beep first, silently, or ringing to be answered —
    each handset its own choice. So the walkie-talkie works to one too.

  • A ringtone for each Yealink handset, and a fixed ring volume (W60B and
    W70B). Pick one of the handset's own rings on its Phone settings tab —
    each handset can have its own — and twocans asks for it on every call to
    it. The ring volume can be fixed for the base, so it can't be turned down
    to nothing.

  • Phone settings for every kind of phone, from what it can do. A W56H
    gets its own: lift off the charger to answer, hang up on the charger,
    call waiting, how an intercom from another handset is answered, key and
    battery tones, its lights, whether the screen stays lit, a big clock when
    idle, 12- or 24-hour time, wallpaper and colours, and calls straight to its
    IP address. Most belong to the base, so changing one changes it on every
    handset there — the page says which don't. Desk phones keep theirs.
    HT801 and HT802 adapters get theirs too, for the corded phone in each
    socket: how loud callers sound and how loud it's heard, caller ID for a
    phone with a screen, its message lamp, a tone when it's left off the hook,
    call waiting, whether tapping the hook puts a call on hold, the adapter's
    own star codes (off, so *78 can't quietly turn on Do Not Disturb), and
    "Pick up to ring a grown-up". The line itself — impedance, caller ID style
    and ring — now matches your country, so a UK corded phone shows who's
    calling. SSH, the *** keypad menu, firmware checks and who may change its
    settings are the adapter's, shared by both sockets.

  • Rotary phones on an HT801 or HT802. Tick "It's a rotary phone" on its
    Phone settings tab and the adapter hears the dial's clicks as numbers (by
    your country's standard), waiting a little longer after the last one —
    there's no # on a dial to say "that's all". The wait can be set for any
    corded phone. Its contact sheet leaves out the lines a dial can't use —
    messages, games, times tables and the kitchen timer all need keys pressed
    during the call — and says so.

  • Poly (Polycom) VVX desk phones — the 150, 201, 250, 300/310, 350,
    400/410, 450, 500/501 and 600/601. Point the phone's provisioning server
    at twocans (the Setup tab has the steps) and it fetches everything: its
    line, its message key ringing 700, the household's time, and its
    speed-dial keys — the line keys after its own, chosen on its Speed-dial
    keys tab and named on its screen. Announcements are answered by
    themselves. Its Phone settings: call waiting, the speakerphone, Do Not
    Disturb and call forwarding on the phone (off), keeping the earpiece
    volume between calls, how bright the idle screen is, a screen saver,
    calls to internet addresses, and editing its contacts on the phone.

  • Fanvil GA10 adapters, for one corded phone — untested. Fanvil
    hasn't published the GA10's own settings template, so its settings follow
    the format and names of Fanvil's newer phones: its line, the household's
    time, "Pick up to ring a grown-up", and Phone settings for call waiting,
    transfer and three-way calls with the hook, Do Not Disturb on the adapter,
    the wait after the last number, how loud callers sound and are heard,
    calls to an IP address, Telnet and firmware upgrades. Its caller ID style
    and line impedance are left as the adapter has them. It's marked
    "Untested" when adding it and on its page, with a link to report how it
    goes.

  • An "Untested" mark for any model twocans sets up from its maker's
    documentation alone, until someone confirms it on a real one — for now the
    Yealink desk phones and W70B and W52P bases, the Cisco SPA112, SPA122,
    ATA 191 and ATA 192, the Poly VVX phones and the Fanvil GA10. (The Yealink
    W60B has been tried on a real one, and isn't marked.) It shows on the model and its maker when
    adding a phone, and on the phone's page, which says what that means and
    where to report how it goes.

  • Cisco SPA112, SPA122, ATA 191 and ATA 192 adapters, for two corded
    phones, each a phone of its own. (The SPA122 has a router built in: its web
    page is reached by plugging a computer into its Ethernet port, and the
    Setup tab says so. An ATA 191 or 192 must be the Multiplatform "-3PW"
    version; the Enterprise one only talks to Cisco's own call manager.)
    Type one line into the adapter (its Profile Rule — the Setup tab has it)
    and it fetches everything else from twocans: both lines, the household's
    time, caller ID and line settings for your country, and its own Phone
    settings — call waiting, hold on a tap of the hook, how long it waits
    after the last number, how loud callers sound and are heard, its message
    lamp, its star codes (off, so *72 can't forward a child's calls), and
    "Pick up to ring a grown-up". They need touch-tone phones: neither can
    hear a rotary dial.

  • The installer works on more Linux, and says what to do when it can't.
    It installs Docker the way that suits the machine — Docker's own script on
    Ubuntu, Debian, Raspberry Pi OS and Fedora; Docker's own packages on Linux
    Mint, Pop!_OS, Rocky and AlmaLinux; the distribution's own on Arch,
    Manjaro, openSUSE, Alpine and Kali — and offers to install any missing
    tools with the right package names. It starts services on OpenRC as well
    as systemd, runs as root where there's no sudo (a Proxmox container, say),
    and explains a 32-bit Raspberry Pi rather than just refusing it. Every
    stop now says what went wrong, what to do, step by step, and where to get
    help; a step that fails explains what its output usually means (no disk
    space, Docker Hub's download limit, no internet…); and anything unexpected
    says so, instead of stopping without a word.

  • Diagnostics for every phone, to send to whoever's helping when one
    won't come online or a setting won't take — on its Setup tab, as a
    download or to read first. One text file: what twocans knows about it,
    how it's signed in (and what it says it is), what it's asked twocans for
    lately, its chosen settings, and the exact settings file it's handed.
    Passwords and keys are taken out, and names, phone numbers, email, MAC
    and IP addresses each get a stand-in — the same each time — so it can go
    on a GitHub issue.

  • "Look for phones" finds every brand twocans sets up — Grandstream,
    Yealink, Poly, Cisco and Fanvil — by the maker's registered MAC prefixes
    (...

Read more

twocans v0.1.6

Choose a tag to compare

@tombruton87 tombruton87 released this 30 Sep 21:45

Voicemail that goes where it should — each number's messages in the right mailbox, messages you can move to a phone, rings-before-voicemail per phone and a speed dial for messages — plus announcements on a timetable, a choice of which number calls go out from, and recording straight into the browser.

Upgrading

./twocans update

Nothing to do afterwards. A number that rings just one phone now takes its messages in that phone's mailbox rather than the house's; change it under Phone line → "messages go to" if you'd rather keep them together.

What's new

Voicemail that goes where it should, announcements on a timetable, a choice of
which number calls go out from, and recording straight into the browser.

Added

  • Each number's messages go to the right mailbox. A number that rings one
    phone takes messages in that phone's mailbox — so the child hears them by
    dialling 700 — and any other number in the house's. Either can be changed
    on the Phone line screen ("messages go to").
  • Move a message to another mailbox from the Voicemail screen: out of the
    house's into a phone's, say. It keeps its transcript and arrives unheard, so
    the phone's message light comes on. Each message says which mailbox it's in.
  • Rings before voicemail, for each phone — 2 to 10 rings, on the phone's
    Rules tab. A call ringing several phones goes to voicemail once the longest
    of them stops. Five rings (30 seconds), as before, until it's set.
  • A speed dial for messages — say 1 — as well as 700, set on the
    Voicemail screen. It's checked against every other number a child dials,
    shows in each phone's numbers, and can go on a hotkey.
  • Announcements that play by themselves at a set time on chosen days —
    "bath time in ten minutes" at 18:50 on school nights. Set under the
    announcement's "Play it by itself".
  • Choose which number calls go out from. A line with more than one
    number has a "Calls out from" card: the line's number for every phone, and
    each phone's own. By itself a phone calls out from the number pointed at
    it, if it has one, else the line's; the phone's page says which.
  • Changes for a phone that's off wait for it. Saving hotkeys (or anything
    else a Grandstream is sent) while it's offline says so, and it's sent them
    the moment it's back; its Setup tab shows "Changes waiting" until then.
  • Record in the browser. Every audio upload — announcements, greetings,
    a phone's message, a person's name clip, jokes, hold music — has a Record
    button beside "Choose a file". It needs twocans' secure (https) address.

Changed

  • Development runs the real stack. make dev is compose.yaml with
    compose.dev.yml on top: the web image built here, ./backend mounted
    live. The old docker-compose-local.yml (and the separate dev PHP and nginx
    images) are gone — it had drifted, and under its own project name would have
    started an empty database. ./install.sh and ./twocans recognise a
    development setup and keep it one.

Fixed

  • Short voicemails are kept. Asterisk threw away any message under 4
    seconds of speech — "hi, it's Tom, call me back" is about 3. The minimum is
    now 1 second; a caller who says nothing still leaves nothing, as the silence
    is trimmed off before it's measured.
  • The call log leaves out announcements and test calls (the Test call
    button, and dialling 600 or 601), and doesn't count them in its totals. A
    short number nobody answers to reads "Dialled 123 · not a phone number".
  • "Numbers the kids tried" no longer lists extensions, twocans' own
    numbers or short numbers like a blocked speed dial: only numbers a grown-up
    could add. They're still blocked, and still in the call log.
  • Phone-width fixes: the Phone line screen no longer runs off the right
    edge; a phone's header gives its name the row, with its status and Test call
    underneath; number pickers show whole numbers; long buttons wrap.
  • ./twocans status counts only the family's calls, like the call log.

Compare: v0.1.5...v0.1.6

twocans v0.1.5

Choose a tag to compare

@tombruton87 tombruton87 released this 30 Sep 20:19

Grandstream desk phones, properly — all four compact hotel phones, hotkeys that actually reach the phone, printable faceplates, changes sent without a restart, and announcements that play through the speaker instead of as a call. Plus music on hold, which was silent before.

Upgrading

./twocans update

The update adds a new pager service (it plays announcements on desk phones; it opens no ports) and fetches the hold music. Then, on each Grandstream desk phone's page, open Setup and press Send its settings now once — or restart the phone — so it learns where to listen for announcements.

From 0.1.1 or earlier, run the one-line install and point it at your twocans folder.

What's new

Grandstream desk phones, properly: all four models, hotkeys that work,
printable faceplates, changes sent straight to the phone, and announcements
that play through the speaker instead of as a call.

Added

  • More desk phones. The GHP610 and GHP611 (three hotkeys) and the GHP620
    (the white GHP621) alongside the GHP621. They share the GHP621's settings,
    so should work the same — but only the GHP621 has been tried on a real phone.
  • Adding a phone goes by what it is — an app, a desk phone or an adapter,
    then the model, each drawn as it looks. Look for phones scans your
    network for Grandstreams that aren't added yet and knows each one's model;
    pick one and its MAC is filled in. One that asks twocans for its settings
    before it's added is offered too.
  • A phone's page is in tabs: Rules, Keys & faceplate (desk phones), Setup.
    A phone that hasn't signed in yet opens on Setup.
  • Changes reach a Grandstream straight away. Saving hotkeys, renaming it,
    or changing the name of someone on one of its keys sends it its settings —
    no restart. Its Setup tab can send them again, or restart it, and says when
    it last fetched them.
  • Hotkeys, laid out like the phone, with a preview of its face, for a
    person, a group (by its speed dial) or a twocans number. A key follows a
    person or group when their number or speed dial changes. After you save
    someone who isn't on a key, twocans offers a free one; the phones list shows
    each desk phone's keys.
  • Printable faceplates. A GHP62x's is a card for behind its clear cover; a
    GHP61x's a 35 × 8.5 mm label for above its three keys. Each shows the photo
    and name of whoever a key rings, in twocans colours or plain white, and is
    previewed beside the hotkeys as they're picked.
  • Announcements play through a desk phone's speaker, with no call to
    answer and no microphone open — the way the phones page natively. A new
    pager service sends them as multicast on the house network (it opens no
    ports). A desk phone that has fetched its settings at home gets them this
    way; phone apps, and desk phones away from home, still get a call.
    ./twocans status and System show whether the pager is running.
  • Your own hold music: add songs under Greetings → Someone put on hold;
    whoever a phone puts on hold hears them, one after another.
  • A proper welcome for test calls — "Congratulations! Your new phone is
    now on the twocans system…" — instead of Asterisk's stock demo, until a
    household records its own greeting. Built-in sounds live in
    storage/defaults/.
  • A recording that's the same as another's (another announcement, or
    another phone's message) is saved, but says so: it's usually the wrong file
    picked.

Changed

  • Saving doesn't reload the page. Announcements, a phone's calls, hours,
    limits, message, hotkeys and provisioning, and the contact editor, save in
    place and say so, refreshing just what changed.
  • Getting started leaves the menu once every step is done, and its page
    can hide it early. System brings it back.

Fixed

  • A GHP621's hotkeys reach the phone. They were written to settings the
    phone doesn't have, so it never saw them.
  • Music on hold. A phone putting someone on hold left them in silence.
    The installer now fetches Asterisk's Opsound set (credited in NOTICE), and
    ./twocans update adds it to an existing install.

Compare: v0.1.4...v0.1.5

twocans v0.1.4

Choose a tag to compare

@tombruton87 tombruton87 released this 30 Sep 12:22

If you have a Grandstream phone or adapter, update: in earlier versions a GHP621, HT801 or HT802 fetched its settings from twocans and then ignored them, so it never signed in.

Highlights

  • Grandstream provisioning works. The settings file was labelled with the wrong format; it's fixed, and tested on a real GHP621W. The in-app setup steps now say to leave http:// out of the Config Server Path, and to fill in the Firmware Server Path (fm.grandstream.com/gs) when the phone asks.
  • The installer works on Alpine, whose BusyBox tools stopped its new install log.
  • Releases now build themselves, for Intel/AMD and for ARM (a Raspberry Pi), and every push runs the tests and both ARM builds.
  • The README leads with the one-line install, with screenshots of the installer and the app.

Upgrading

./twocans update

From 0.1.1 or earlier, run the one-line install and point it at your twocans folder. Then reboot any Grandstream phone or adapter, so it fetches its settings again.

Full changelog

Changed

  • The README leads with the one-line install, and shows the installer and the
    app — screenshots from a demo install with a made-up family.

Added

  • Images for ARM (a Raspberry Pi) as well as Intel/AMD: twocans' own web and
    speech-to-text images are built natively for both and published under one
    name, so Docker pulls the one that fits. A Pi no longer spends 15–30 minutes
    building them; the installer checks for an ARM build and only builds locally
    when a release lacks one.
  • Releases build themselves: pushing a version tag runs a GitHub Actions
    workflow that builds, publishes and checks the images on both chip types (and
    refuses a tag that doesn't match backend/VERSION). It can also be run by
    hand for an existing tag.
  • Checks on every push and pull request: the scripts parse, and the whole
    test suite runs in the web image against a fresh MariaDB.

Fixed

  • Grandstream phones and adapters fetched their settings and ignored them.
    The file was written as numbered settings (<P271>…) but labelled as
    Grandstream's other, named format (<config version="2">), so a GHP621 or an
    HT801/HT802 never signed in. It's labelled version 1 now, and carries the MAC.
    The setup steps also say to leave http:// out of the Config Server Path (the
    phone refuses it) and to fill in the Firmware Server Path when it's asked for.

  • The install log used sed -u and grep --line-buffered, which BusyBox (as
    on Alpine) lacks, and stopped the installer after its first few lines there.
    It now uses awk, which behaves the same everywhere.

Compare: v0.1.3...v0.1.4

twocans v0.1.3

Choose a tag to compare

@tombruton87 tombruton87 released this 28 Sep 15:39

An easier start: install in one line, a Getting started guide in the app, and twocans.local.

Install in one line

curl -fsSL https://raw.githubusercontent.com/tombruton87/TwoCans/main/get.sh | bash

It asks where to put twocans, installs git — and Docker, with Docker's own script — if they're missing (asking first), then runs the installer. Read it first if you like.

Highlights

  • Getting started — after you create your account, a short checklist: add a phone, add people, connect a line (or skip it), make a test call. "Do it later" puts it in the menu.
  • http://twocans.local — find it by name on your home network, not an address.
  • Docker, installed for you — if it's missing or stopped, the installer offers to sort it out.
  • A record of every install in storage/reports/, included in ./twocans report.

Upgrading

  • From 0.1.2: ./twocans update
  • From 0.1.1 or earlier: run the one-liner above and point it at your twocans folder — it recognises the older install and upgrades it.

Migration 047 marks households that are already running as having finished Getting started, so it won't pop up for you.

Full changelog

Added

  • Install in one line: curl -fsSL …/get.sh | bash asks where to put
    twocans, installs git if it's missing (asking first), clones it and runs the
    installer; run again, it updates instead.
  • The installer offers to install Docker when it's missing — with Docker's
    own script, asking first — adds you to the docker group and carries on in the
    same session. It also offers to start Docker when it's installed but stopped.
  • http://twocans.local: the installer asks for a name on the network and
    publishes it through Avahi (one line in /etc/avahi/hosts, asking first; it
    offers to install Avahi where it's missing), then checks it answers. The name
    is in the final summary and ./twocans status; uninstalling removes it.
  • Getting started, in the web app: after the Owner is created, a checklist
    — add a phone, add the people they can call, connect a phone line (or skip
    it), make a test call — each ticked from what's really there. "Do it later"
    moves it to the menu, where it always is (with how far along it is); until
    then the dashboard carries a reminder. Households already running are marked
    finished (migration 047).
  • A record of every install: the installer keeps what it showed — without
    the colours — in storage/reports/install-<when>.log, readable only by you,
    and ./twocans report includes the latest.
  • Where Face ID needs HTTPS, it says so: signing in with a passkey and
    adding twocans to a phone's home screen only work over HTTPS, so the
    installer's summary and Getting started point to where the address and
    certificate are set up.

Fixed

  • The one-liner, and ./twocans update, upgrade installs from 0.1.1 and
    earlier.
    Those have no ./twocans, and their Asterisk configs held
    passwords the old way, which blocked git pull; the configs are put back
    first (the installer now keeps the passwords elsewhere), then it updates.

  • Running the installer as root set the app's user to root, which it can't run
    as: the web app wouldn't start once its image was built locally (as on a
    Raspberry Pi). The installer now uses the person behind sudo, or 1000, and
    repairs an .env that has 0; the image falls back to 1000 as well.

Compare: v0.1.2...v0.1.3

twocans v0.1.2

Choose a tag to compare

@tombruton87 tombruton87 released this 28 Sep 14:45

A friendlier install, and one command to look after it afterwards.

Highlights

  • ./twocans — status, logs, backup / backups / restore, export (your call log, voicemails and contacts as spreadsheets, plus recordings, in one zip), version, update, report (a support report with private details removed), reset-owner, check and uninstall.
  • A guided installer — the twocans logo, a few questions with suggested answers, port checks that offer another web port when one's taken, firewall rules checked against what twocans needs, and checks that this machine's address won't change, Docker starts on boot and the clock is in sync.
  • Locked out? ./twocans reset-owner resets the Owner's password, email or passkeys, and can sign out every browser.
  • ./install.sh --uninstall — keeps your data unless you type delete.

Upgrading from 0.1.1

The installer used to write Asterisk's passwords into two tracked files; they now live outside git. So git pull may refuse at first — put those files back, then pull and run the installer, before Asterisk next restarts:

git checkout -- docker/asterisk/etc/ari.conf docker/asterisk/etc/manager.conf docker/asterisk/etc/voicemail.conf
git pull
./install.sh

The installer writes the passwords to their new place, applies migration 046, and fetches Asterisk's spoken prompts into their new volume. From now on, updating is just ./twocans update.

Full changelog

Added

  • A guided installer. ./install.sh checks the software (Docker, Compose,
    the tools it uses, memory and disk), asks a few questions with a suggested
    answer for each, checks every port twocans publishes — offering another port
    for the web interface or HTTPS when something else holds it, and explaining a
    clash on the SIP ports or call audio range, which can't move — and reads the firewall's rules (ufw or
    firewalld, with sudo, asking first) to check each port against them —
    allowed, allowed only from some addresses, or missing — offering to add only
    what's missing. It says when ufw is installed but switched off. On ARM (a Raspberry Pi) it builds the
    images locally. It is also the updater — git pull && ./install.sh, or
    make update — keeping .env, asking before cutting off a call in progress,
    and restarting Asterisk only when its transports or passwords changed.
    It also checks this machine: that its address won't change (warning when the
    router hands it out, with the hardware address to reserve it for), that Docker
    starts on boot, and that the clock is kept in time — offering to fix the last
    two. --check, --yes, --reconfigure, --no-start, --write-secrets, and
    --uninstall, which keeps your data unless you type delete, and only ever
    removes data — never the repo's own files.

  • Reset the Owner account from the command line: ./install.sh --reset-owner (or make reset-owner). It shows the Owner and offers a new
    sign-in email, a new password (clearing any lockout), removing its passkeys,
    and signing out every browser already signed in — confirming before it
    changes anything. With no Owner it makes one, from an existing grown-up or
    new. Signing out everywhere is new too: sessions begun before it are refused
    (migration 046). Standard installs get it with the next image.

  • ./twocans, one command for looking after it, working the same on a
    standard install and a development setup: status (containers, system
    checks, phones, the phone line and credit, today, backups, disk), logs,
    backup / backups / restore, export (the call log, voicemails and
    contacts as spreadsheets plus the recordings, in one zip), version and
    update (comparing with GitHub's latest; stopping rather than overwriting
    files changed by hand), report (a support report with passwords, names,
    numbers, emails, the domain and public IPs removed), plus reset-owner,
    check and uninstall. The installer and it share one look
    (scripts/ui.sh).

  • The app knows its version: backend/VERSION, baked into the image.

Changed

  • Asterisk's control passwords are no longer kept in tracked files.
    ari.conf and manager.conf include them from docker/asterisk/etc/secrets/,
    which install.sh writes from .env and git ignores — so an update never
    conflicts with them, and they can't be committed. Upgrading: if git pull
    refuses because of local changes to those two files, run
    git checkout -- docker/asterisk/etc/ari.conf docker/asterisk/etc/manager.conf
    and pull again; then run ./install.sh (or ./install.sh --write-secrets)
    before Asterisk next restarts.

Fixed

  • Backups were readable by everyone on the machine; they hold the whole
    database, so they're now readable only by their owner (as exports and
    reports are).
  • Asterisk's spoken prompts were lost whenever the stack was taken down, and
    group calls then admitted nobody: the image keeps them on an unnamed volume of
    its own. They now have a named volume, asterisk-sounds. Run ./install.sh
    once after updating to fetch them into it.
  • The README's copy of the example compose file was missing the phone line's
    SIP port.

Compare: v0.1.1...v0.1.2

twocans v0.1.1

Choose a tag to compare

@tombruton87 tombruton87 released this 28 Sep 09:56

Fixes for call recordings and transcripts.

Fixed

  • Group calls were never transcribed. Their recording was set to be named
    after the call, but the conference's own settings profile overrode it, so
    Asterisk used its default name and the call log never found the file. The
    call now joins with a profile of its own built on the house one, so the
    name holds. Group calls recorded under the old name are matched up.
  • Group calls from a phone in adult mode were recorded, for the same
    reason. They no longer are.
  • The call log showed Transcribing… for ever on calls that were never
    recorded: adult mode, announcements, or a recording that never appeared.
    Fifteen minutes after such a call ends it now says nothing was recorded.

Upgrading

No database changes. Pull the new image and restart:

docker compose pull && docker compose up -d

The group-call fix is in the generated dialplan, which is rewritten the next time anything is saved in the app — or straight away with:

docker exec twocans-php php -r 'require "/var/www/html/src/init.php"; (new PjsipConfig(new DeviceRepository()))->apply();'

Full changelog: v0.1.0...v0.1.1