Last updated: 2026-05-24
| Service | Port | URL | How to manage |
|---|---|---|---|
| pbx-admin Super Admin Portal | 5050 | http://patioweb09:5050 | pkill -f "gunicorn.*wsgi"; cd ~/pbx-admin && bash start.sh & |
| Uptime Kuma Monitoring | 3001 | http://patioweb09:3001 | systemctl --user start/stop/restart uptime-kuma |
| pbx-dashboard (legacy, port 5000) | 5000 | http://patioweb09:5000 | Gunicorn PID in /tmp/pbx-dashboard.pid |
| Adaptive Futures Bot | — | — | systemctl --user status adaptive-futures-bot |
| Adaptive Futures Dashboard | 8000 | http://patioweb09:8000 | systemctl --user status adaptive-futures-dashboard |
| Caddy (reverse proxy) | 80 / 443 | https://adminpbx.patiocrm.in | systemctl status caddy |
Repo: git@github.com:gauravj18/patiodesk-admin.git
Path: /home/patio-admin/pbx-admin/
Version: 20260523-0001
Stack: Python 3.10 · Flask · SQLAlchemy · Gunicorn 23 · SQLite
| Phase | Features |
|---|---|
| 1 | Client management, RBAC, Fernet-encrypted secrets, API keys |
| 2 | SIP templates (6 built-ins), heartbeat API, webhooks, audit log |
| 3 | Billing (Subscriptions + Invoices), plan enforcement scheduler, MFA/TOTP |
| 4 | Prometheus metrics (/api/v1/metrics), SLA monitoring (/sla), client self-service portal (/portal), live calls widget (Panoramisk AMI), Fleet Health doughnut chart |
| Endpoint | Auth | Description |
|---|---|---|
POST /api/heartbeat/<client_id> |
X-Heartbeat-Token | Heartbeat from deployed PBX |
GET /api/v1/metrics |
X-Api-Key (scope: read) | Prometheus exposition format |
GET /api/fleet/stream |
Session | SSE live fleet stats |
GET /api/live/calls |
Session | Live Asterisk channels via AMI |
GET /portal/login |
— | Client self-service portal |
GET /sla |
Session | Fleet SLA table |
_AMI_SECRET in app/services/ami_service.py (SSH to 192.168.80.40, read /etc/asterisk/manager.conf)cd ~/pbx-admin && git add -A && git commit -m "feat: Phase 4 — metrics, SLA, client portal, live calls" && git pushPath: /home/patio-admin/uptime-kuma/
Version: 2.3.2 (pre-built dist)
Stack: Node.js 24 · SQLite
Data dir: /home/patio-admin/uptime-kuma/data/
Systemd service: ~/.config/systemd/user/uptime-kuma.service
Startup command (manual):
DATA_DIR=/home/patio-admin/uptime-kuma/data \
node /home/patio-admin/uptime-kuma/server/server.js --port 3001
First-time setup: Open http://patioweb09:3001 in a browser → create admin account → add monitors.
Path: /home/patio-admin/pbx-dashboard-react/
Stack: Vite · React 18 · TypeScript · Tremor · Recharts
Status: Scaffolded — dependencies not yet installed
To activate:
cd /home/patio-admin/pbx-dashboard-react
npm install
npm install @tremor/react recharts
npm run dev # dev server → http://localhost:5173
npm run build # production build → dist/
What's built:
- src/lib/api.ts — typed fetch wrapper for pbx-admin API at port 5050
- src/pages/Dashboard.tsx — KPI cards, Fleet Health donut, Live Calls table
Path: ~/.claude/
Source: github.com/affaan-m/ECC
| Skill | When used |
|---|---|
python-patterns |
Python / Flask code |
fastapi-patterns |
FastAPI projects |
django-patterns |
Django projects |
security-review |
Security audits |
tdd-workflow |
Test-driven development |
deployment-patterns |
systemd, CI/CD |
docker-patterns |
Containers |
database-migrations |
Alembic / Django migrations |
error-handling |
Error handling patterns |
git-workflow |
Branching, PRs |
terminal-ops |
Linux shell operations |
/python-review /security-scan /code-review
/build-fix /plan /pr
/refactor-clean /quality-gate /test-coverage
/feature-dev /resume-session /save-session
Claude Code now follows these on every task automatically: 1. Think Before Coding — state assumptions, ask when uncertain 2. Simplicity First — no speculative features or over-abstraction 3. Surgical Changes — touch only what must change 4. Goal-Driven Execution — verifiable success criteria before starting
Not installed locally — use as a generator when starting a new mobile project:
npx ignite-cli@latest new PatioPBXApp \
--bundle com.patiodesk.pbxadmin \
--git=false
Gives you: Expo SDK, TypeScript, Expo Router, MobX-State-Tree, Tamagui UI, Storybook, E2E tests.
Status: Not yet installed (pip install panoramisk pending)
Used by: pbx-admin/app/services/ami_service.py
Install:
pip3 install panoramisk --user
# then add to pbx-admin/requirements.txt:
echo "panoramisk>=1.2" >> /home/patio-admin/pbx-admin/requirements.txt
What it does: Connects to Asterisk Manager Interface (AMI) on port 5038 to pull live call data (CoreShowChannels action) for the dashboard Live Calls widget.
| Item | Value |
|---|---|
| Host | 192.168.80.98 (primary) · 192.168.80.40 (secondary) |
| OS | Debian, Asterisk 22.8.2 / Wazo |
| Airtel trunk | DID: +917714802000 · SBC: 10.2.8.67 · Media: 10.2.10.0/24 via ens19 |
| Extension range | 1001–1010 (on .40), 2001–2002 (on .98) |
| Bug | Fix |
|---|---|
| Extensions not registering (.40) | AOR rename + short-name endpoint sections via Python script |
| Wrong transport name (.40) | transport-udp → airtel_private_sip_4802000_transport_udp (22 occurrences) |
| PJSIP DNS bypass | dnsmasq on 127.0.0.1, /etc/hosts for Airtel FQDNs |
| Outbound 407 IP mismatch | Fixed by Codex (details in git history on .40) |
| One-way audio (.40) | Added 10.2.10.0/24 route via ens19 to /etc/systemd/network/40-airtel-link.network |
| One-way audio (.98) | Same — 10.2.10.0/24 route via ens19 |
Route header \;lr |
Dialplan semicolon escape fix |
| Runtime | Version | Installed via |
|---|---|---|
| Python | 3.10.12 | System |
| Node.js | 24.14.1 | nvm (~/.nvm) |
| Gunicorn | 23.0.0 | pip3 |