Fold asterisk-digital-ocean into asterisk with droplet auto-detection
services/asterisk-digital-ocean.sh was a near-verbatim copy of services/asterisk.sh — same vendor refresh, compose template, messaging dialplan, presence alerts, UFW rules and dashboard/trunk chaining, with the helper functions renamed _asterisk_do_*. Two copies meant every fix had to land twice, and several never did. There is now one `asterisk` service. It reads the DigitalOcean metadata service and asks either way (so a droplet with metadata blocked, or another provider's public VM, can still opt in), then gates the genuinely droplet-specific behaviour on that one answer: swapfile for low-RAM plans, public-FQDN-only setup with no LAN/VLAN prompts, a Caddy site block pinned to that FQDN, the remote-Authelia option, and the doctl Cloud Firewall. Two things that were droplet-only for no real reason now apply everywhere: the entrypoint patch that writes security-level events to logs/full, and the logrotate config for that file. Without them the Security Dashboard's Security Log tab and CrowdSec's Asterisk acquisition were silently empty on every home/LAN install; crowdsec.sh now detects either install directory. Existing droplets are left alone: an install at ~/docker/asterisk-digital-ocean keeps its directory and easy-asterisk-do container names, since its Caddyfile block, UFW rules, Cloud Firewall, CrowdSec acquisition and PSTN trunk all name those exactly. New installs use ~/docker/asterisk / easy-asterisk. `sudo ./setup.sh asterisk-digital-ocean` still works via a new SERVICE_ALIAS map in setup.sh, without a second menu entry. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NAddJGE1G6eGaPzmScG5Vh
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# Anveo Direct + Easy Asterisk — confirmed working setup guide
|
||||
|
||||
This is the exact sequence that got a real Anveo Direct DID working end to
|
||||
end (both outbound and inbound) with `asterisk-digital-ocean.sh` +
|
||||
`pstn-trunk.sh`, confirmed live on a real droplet.
|
||||
end (both outbound and inbound) with `asterisk.sh` + `pstn-trunk.sh`,
|
||||
confirmed live on a real droplet.
|
||||
|
||||
**Steps 1, 3 and 4 are one-time account setup** — the outbound Service
|
||||
Trunk (step 3) and the inbound SIP Trunk (step 4) each cover every DID on
|
||||
@@ -13,8 +13,8 @@ in the dashboard, and test.
|
||||
|
||||
## 0. Prerequisites
|
||||
|
||||
- `asterisk-digital-ocean.sh` (or `asterisk.sh` for a LAN box) already
|
||||
installed and running, with at least one extension configured.
|
||||
- `asterisk.sh` already installed and running (droplet or home/LAN — the
|
||||
installer detects which), with at least one extension configured.
|
||||
- This box's public IP address (`curl -4 ifconfig.me`).
|
||||
|
||||
## 1. Anveo Direct account (one-time)
|
||||
@@ -194,7 +194,9 @@ In the Security Dashboard's PSTN Trunk tab:
|
||||
answers or 20 seconds pass.
|
||||
- Watch the live console while testing either direction:
|
||||
```
|
||||
docker exec -it easy-asterisk-do asterisk -rvvv
|
||||
docker exec -it easy-asterisk asterisk -rvvv
|
||||
# on a droplet set up before the two Asterisk services were merged, the
|
||||
# container is named easy-asterisk-do instead
|
||||
```
|
||||
|
||||
## Bugs hit and fixed along the way (informational — already fixed)
|
||||
|
||||
Reference in New Issue
Block a user