docs(handoff): add complete new-environment Day-0 startup pack
This commit is contained in:
parent
3719edaba9
commit
47b60dfed0
154
docs/ai/restart/HANDOFF-NUOVO-AMBIENTE-DAY0.md
Normal file
154
docs/ai/restart/HANDOFF-NUOVO-AMBIENTE-DAY0.md
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
# Handoff Nuovo Ambiente Day-0
|
||||
|
||||
Data: 2026-03-11
|
||||
Baseline commit Day-0: `3719eda`
|
||||
Repository: `michele/netgescon-day0`
|
||||
|
||||
## 1) Stato confermato
|
||||
|
||||
- CTI Panasonic NS1000 implementato con endpoint:
|
||||
- `POST /api/v1/cti/panasonic/incoming`
|
||||
- `POST /api/v1/cti/panasonic/call-ended`
|
||||
- `GET /api/v1/cti/panasonic/lookup`
|
||||
- Post-it: auto-creazione su incoming, auto-chiusura su call-ended con `esito`, `durata_secondi`, `chiusa_il`.
|
||||
- Script disponibili:
|
||||
- `scripts/ops/netgescon-panasonic-csta-test.sh`
|
||||
- `scripts/ops/netgescon-cti-listener.sh`
|
||||
|
||||
## 2) Ambienti reali
|
||||
|
||||
- Sviluppo interno:
|
||||
- path: `/home/michele/netgescon/netgescon-day0`
|
||||
- web: `php artisan serve --host=0.0.0.0 --port=8000`
|
||||
- URL: `http://127.0.0.1:8000`
|
||||
- Staging online:
|
||||
- path: `/var/www/netgescon`
|
||||
- web server: `nginx`
|
||||
- porta: `80`
|
||||
- URL: `http://<IP_SERVER_200>/`
|
||||
|
||||
## 3) Comandi pronti (operativi)
|
||||
|
||||
### 3.1 Avvio sviluppo locale
|
||||
|
||||
```bash
|
||||
cd /home/michele/netgescon/netgescon-day0
|
||||
php artisan serve --host=0.0.0.0 --port=8000
|
||||
```
|
||||
|
||||
### 3.2 Deploy rapido staging
|
||||
|
||||
```bash
|
||||
cd /var/www/netgescon
|
||||
php artisan migrate --force
|
||||
php artisan optimize:clear
|
||||
sudo systemctl reload nginx
|
||||
```
|
||||
|
||||
### 3.3 Ascolto payload HTTP grezzo (super minimale)
|
||||
|
||||
```bash
|
||||
ncat -kl 8099
|
||||
```
|
||||
|
||||
Fallback se `ncat` non presente:
|
||||
|
||||
```bash
|
||||
while true; do nc -l -p 8099; echo; echo "-----"; done
|
||||
```
|
||||
|
||||
### 3.4 Sniffing CSTA grezzo
|
||||
|
||||
```bash
|
||||
sudo tcpdump -i any -nn -s0 -A host 192.168.0.101 and port 33333
|
||||
```
|
||||
|
||||
Se non vedi traffico:
|
||||
|
||||
```bash
|
||||
sudo tcpdump -i any -nn -s0 -A port 33333
|
||||
sudo tcpdump -i any -nn "tcp port 33333"
|
||||
sudo tcpdump -i any -nn -s0 -A host 192.168.0.101 and \(port 33333 or port 33334 or port 33335\)
|
||||
sudo ss -lntp | grep -E ':33333|:8099|:80'
|
||||
```
|
||||
|
||||
### 3.5 Simulazione chiamate da terminale
|
||||
|
||||
Incoming:
|
||||
|
||||
```bash
|
||||
curl -sS -X POST "http://127.0.0.1:8000/api/v1/cti/panasonic/incoming" -H "Content-Type: application/json" -H "X-CTI-Token: <TOKEN_REALE>" -d '{"phone":"+393331112233","direction":"in_arrivo","called_extension":"101","event_id":"evt-001","note":"test incoming"}'
|
||||
```
|
||||
|
||||
Call-ended:
|
||||
|
||||
```bash
|
||||
curl -sS -X POST "http://127.0.0.1:8000/api/v1/cti/panasonic/call-ended" -H "Content-Type: application/json" -H "X-CTI-Token: <TOKEN_REALE>" -d '{"phone":"+393331112233","event_id":"evt-001","outcome":"risposta","duration_seconds":83,"ended_at":"2026-03-11T10:20:00+01:00","note":"test call-ended"}'
|
||||
```
|
||||
|
||||
Lookup:
|
||||
|
||||
```bash
|
||||
curl -sS "http://127.0.0.1:8000/api/v1/cti/panasonic/lookup?phone=+393331112233" -H "X-CTI-Token: <TOKEN_REALE>"
|
||||
```
|
||||
|
||||
## 4) Prompt pronto da dare al nuovo agent
|
||||
|
||||
Copia/incolla questo messaggio al nuovo agent:
|
||||
|
||||
```text
|
||||
Sei il nuovo agent operativo su NetGescon Day-0. Esegui attività complete (modifica codice + verifica + commit/push), non fermarti alla sola analisi.
|
||||
|
||||
Contesto:
|
||||
- Repo: michele/netgescon-day0
|
||||
- Branch: main
|
||||
- Baseline: 3719eda
|
||||
- Staging online: /var/www/netgescon via nginx su porta 80
|
||||
- Sviluppo: /home/michele/netgescon/netgescon-day0 su porta 8000
|
||||
|
||||
CTI Panasonic già presente:
|
||||
- POST /api/v1/cti/panasonic/incoming
|
||||
- POST /api/v1/cti/panasonic/call-ended
|
||||
- GET /api/v1/cti/panasonic/lookup
|
||||
|
||||
Obiettivo immediato:
|
||||
1) Validare end-to-end dev+staging (incoming crea post-it, call-ended chiude con esito/durata)
|
||||
2) Adattare mapping payload PBX reale se necessario
|
||||
3) Aggiornare documentazione operativa
|
||||
4) Riportare report finale con comandi, output chiave e id record verificati
|
||||
|
||||
File guida da leggere subito:
|
||||
- docs/ai/restart/START-HERE-NETGESCON-DAY0.md
|
||||
- docs/ai/restart/HANDOFF_AGENT_OPERATIVO_20260311.md
|
||||
- docs/ai/restart/AGENT-OPERATIVO-COMANDI-DAY0.md
|
||||
- docs/ai/restart/CTI-PANASONIC-NS1000-SETUP.md
|
||||
- docs/NETGESCON-MODIFICHE.md
|
||||
- docs/NETGESCON-GIT-AUTOCHANGELOG.md
|
||||
|
||||
Vincoli:
|
||||
- Non rompere flusso PostIt/Filament esistente
|
||||
- Non revertare modifiche utente non richieste
|
||||
- Validare sempre con test/route/query prima del commit
|
||||
```
|
||||
|
||||
## 5) Documenti e manuali presenti (conferma)
|
||||
|
||||
Nel Day-0 risultano presenti i documenti restart chiave:
|
||||
|
||||
- `docs/ai/restart/START-HERE-NETGESCON-DAY0.md`
|
||||
- `docs/ai/restart/HANDOFF_AGENT_OPERATIVO_20260311.md`
|
||||
- `docs/ai/restart/AGENT-OPERATIVO-COMANDI-DAY0.md`
|
||||
- `docs/ai/restart/CTI-PANASONIC-NS1000-SETUP.md`
|
||||
- `docs/ai/restart/CONTINUITA-STORICO-DAY0.md`
|
||||
- `docs/ai/restart/FILAMENT-ONLY-CUTOVER-CHECKLIST.md`
|
||||
|
||||
Nel workspace sono presenti centinaia di documenti `.md` (manuali storici inclusi) tra Day-0 e legacy.
|
||||
|
||||
## 6) Checklist passaggio ambiente
|
||||
|
||||
1. Aprire repo Day-0 e verificare branch `main`.
|
||||
2. Verificare variabile `NETGESCON_CTI_SHARED_TOKEN` in `.env`.
|
||||
3. Eseguire migrate nell'ambiente target.
|
||||
4. Eseguire test `incoming` + `call-ended`.
|
||||
5. Verificare record in `chiamate_post_it` (stato/esito/durata).
|
||||
6. Aggiornare `docs/NETGESCON-MODIFICHE.md` con ogni variazione funzionale.
|
||||
Loading…
Reference in New Issue
Block a user