feat: real-time active call SSE — hold/unhold status for supervisor live monitor

- SupervisorService: added activeCallSubject (RxJS Subject), emits on all
  activeCalls Map mutations (Answered, Calling, Disconnect, Hold, Unhold)
- SupervisorController: new @Sse('active-calls/stream') endpoint
- OzonetelAgentController: callControl HOLD/UNHOLD updates activeCalls Map
  status via supervisor.updateCallStatus()

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-17 05:45:14 +05:30
parent 9cf0f69dde
commit 9a016a2ed0
3 changed files with 33 additions and 4 deletions

View File

@@ -382,6 +382,13 @@ export class OzonetelAgentController {
try {
const result = await this.ozonetelAgent.callControl(body);
if (body.action === 'HOLD') {
this.supervisor.updateCallStatus(body.ucid, 'on-hold');
} else if (body.action === 'UNHOLD') {
this.supervisor.updateCallStatus(body.ucid, 'active');
}
return result;
} catch (error: any) {
const message = error.response?.data?.message ?? error.message ?? 'Call control failed';