diff --git a/app/Http/Controllers/Api/PanasonicCstaController.php b/app/Http/Controllers/Api/PanasonicCstaController.php index fa8fb30..03045c8 100644 --- a/app/Http/Controllers/Api/PanasonicCstaController.php +++ b/app/Http/Controllers/Api/PanasonicCstaController.php @@ -184,6 +184,22 @@ public function callEnded(Request $request): JsonResponse private function isAuthorized(Request $request): bool { $configured = (string) env('NETGESCON_CTI_SHARED_TOKEN', ''); + if ($configured === '') { + $configured = (string) env('CTI_SHARED_SECRET', ''); + } + + if ($configured === '') { + $configured = (string) env('CTI_SHARED_TOKEN', ''); + } + + if ($configured === '') { + $configured = (string) env('CTI_TOKEN', ''); + } + + if ($configured === '') { + $configured = (string) env('CTI_PANASONIC_TOKEN', ''); + } + if ($configured === '') { return false; } diff --git a/docs/NETGESCON-MODIFICHE.md b/docs/NETGESCON-MODIFICHE.md index 2c1eb30..cb0c65e 100644 --- a/docs/NETGESCON-MODIFICHE.md +++ b/docs/NETGESCON-MODIFICHE.md @@ -19,3 +19,4 @@ # Modifiche NetGescon | 11/03/2026 | 0.8.x-dev | Test pipeline | Verifica script aggiornamento changelog Filament | [P] | | 11/03/2026 | 0.8.x-dev | CTI Panasonic / Post-It | Nuovi endpoint incoming, lookup e call-ended con chiusura automatica Post-it, salvataggio esito e durata chiamata | [U] | | 11/03/2026 | 0.8.x-dev | Day-0 / Staging / Operativita | Handoff operativo completo, comandi diagnostica payload CSTA/HTTP e allineamento staging nginx su /var/www/netgescon:80 | [P] | +| 11/03/2026 | 0.8.x-dev | CTI Panasonic / DB condiviso | Verificato allineamento DB dev/staging su base unica, applicata migrazione campi `durata_secondi`/`chiusa_il`, fallback token CTI multi-chiave e test end-to-end incoming/call-ended/lookup con chiusura Post-it validata | [U] |