Files
easy-asterisk/.env.example
T
Claude 9caa795a78 Add Docker containerization, VPN STUN/ICE support, and DNS whitelist tools
- Dockerfile: Containerized Asterisk PBX with Ubuntu 24.04 base,
  all dependencies pre-installed, health checks, and volume persistence
- docker-compose.yml: Asterisk service with host networking (required for
  RTP port range) + optional self-hosted coturn STUN server via --profile stun
- docker/entrypoint.sh: Auto-generates configs, certs, and starts
  Asterisk in foreground with web admin in background
- scripts/vpn-diagnostics.sh: Detects VPN interfaces, checks PJSIP
  transport config, tests STUN reachability, analyzes NAT type, and
  provides STUN/TURN recommendations for third-party VPNs
- scripts/dns-whitelist.sh: Documents all domains needed per network mode
  (LAN/VPN vs FQDN), per component (server, Sipnetic, Linphone), with
  --check mode to test DNS resolution and reachability
- easy-asterisk script: Added VPN STUN/ICE menu (option 12 in Server
  Settings) with self-hosted coturn, Google STUN, or custom STUN server
  options. LAN/VPN devices now get ice_support=yes when VPN ICE is
  enabled. Web admin Python code also respects VPN_ICE_ENABLED config.

Self-hosted coturn in STUN-only mode eliminates all external DNS
dependencies - everything operates by IP address, ideal for
DNS-filtered environments.

https://claude.ai/code/session_01Vm6NLaQuzM4VosAotqS1q8
2026-02-21 13:08:34 +00:00

58 lines
2.4 KiB
Bash

# ================================================================
# Easy Asterisk - Environment Configuration
#
# Copy this file to .env and modify as needed:
# cp .env.example .env
#
# Then start with:
# docker compose up -d # Asterisk only
# docker compose --profile stun up -d # Asterisk + STUN server
# ================================================================
# ── Network Mode ─────────────────────────────────────────────
# Leave DOMAIN_NAME empty for LAN/VPN mode (recommended for VPN setups)
# Set to your FQDN for internet calling mode (requires TLS certs)
DOMAIN_NAME=
ENABLE_TLS=n
# Primary network CIDR (auto-detected if empty)
# Example: 192.168.1.0/24
LOCAL_CIDR=
# ── VPN / VLAN Subnets ──────────────────────────────────────
# Set HAS_VLANS=y and list your VPN/VLAN subnets (space-separated)
# This tells Asterisk to treat these as local networks
#
# Examples:
# WireGuard: 10.8.0.0/24
# OpenVPN: 10.10.0.0/24
# Tailscale: 100.64.0.0/10
# Third-party: Check your VPN client for the assigned subnet
HAS_VLANS=n
VLAN_SUBNETS=
# ── STUN Server ──────────────────────────────────────────────
# For self-hosted coturn (recommended for DNS-filtered networks):
# 1. Start with: docker compose --profile stun up -d
# 2. Set STUN_SERVER to your server's VPN IP:3478
# Example: STUN_SERVER=10.8.0.1:3478
#
# For Google STUN (requires DNS access to stun.l.google.com):
# STUN_SERVER=stun.l.google.com:19302
#
# Leave empty if VPN provides direct routing (no NAT between endpoints)
STUN_SERVER=
VPN_ICE_ENABLED=n
CUSTOM_STUN_SERVER=
# ── RTP Port Range ───────────────────────────────────────────
# Default: 10000-20000 (10,000 ports)
# For constrained environments, reduce to e.g. 10000-10100
RTP_START=10000
RTP_END=20000
# ── Web Admin ────────────────────────────────────────────────
WEB_ADMIN_PORT=8080
# Set to true if using a reverse proxy with its own auth
WEB_ADMIN_AUTH_DISABLED=false