Supervisor

The Supervisor module provides real-time monitoring and intervention capabilities for the call center.

1. Real-time Monitoring

1.1 Dashboard

Call Center → Real-time Monitoring (/cc/realtime):

MetricDescription
Queue countCurrent number of callers in each queue
Active callsOngoing calls
Idle agentsNumber of agents currently in Idle state
Average waitAverage wait time in queue
SLA rateAnswer rate within X seconds

1.2 Queue Details

GET /cc/queue-detail?queue=sales-queue:

  • Wait time for each call in the queue
  • Queue position
  • Caller information

1.3 Agent Status Overview

Displays real-time status of all agents:

  • State (Idle / Busy / Wrapup / Away / …)
  • Current call duration (if Busy)
  • Calls handled today

2. Call Monitoring

2.1 Listen

Supervisor silently joins the call; neither agent nor caller is aware:

POST /cc/calls/{call_id}/monitor
Body: { "action": "listen" }

2.2 Whisper

Supervisor speaks to the agent only; the caller cannot hear:

POST /cc/calls/{call_id}/monitor
Body: { "action": "whisper" }

2.3 Barge

Supervisor joins the call as a three-way conference:

POST /cc/calls/{call_id}/monitor
Body: { "action": "barge" }

2.4 Takeover

Supervisor takes over the agent’s call; the agent is removed:

POST /cc/calls/{call_id}/monitor
Body: { "action": "takeover" }

2.5 End Monitoring

DELETE /cc/supervisor/sessions/{session_id}

3. SLA Monitoring

3.1 SLA Definition

SLA (Service Level Agreement) measures the percentage of calls answered within a specified time:

SLA = Calls answered within X seconds / Total inbound calls × 100%

Default threshold: 80% of calls answered within 20 seconds.

3.2 SLA Statistics API

GET /cc/sla

Returns:

  • SLA rate per queue
  • Average speed of answer (ASA)
  • Abandonment rate

3.3 SLA Alerts

Alerts are triggered when SLA falls below threshold (/cc/alerts):

Alert TypeCondition
SLA below thresholdSLA < 80%
Queue overflowQueue count > max_size
Wait timeoutCall waiting > 120s
No available agentsAll agents Offline/Away

Acknowledge alert: POST /cc/alerts/{alert_id}/acknowledge

4. Call Operations

4.1 Call Notes

PATCH /cc/calls/{call_id}
Body: { "note": "Customer requested callback" }

4.2 After-Call Work Submission

POST /cc/calls/{call_id}/acw
Body: { "category": "complaint", "result": "resolved", "note": "..." }

4.3 Consult Transfer

POST /cc/calls/{call_id}/consult
Body: { "target": "agent-002", "type": "consult" }

Types:

  • consult: Consult transfer (speak with target agent first, then decide whether to transfer)
  • blind: Blind transfer (direct transfer)

4.4 End Call

POST /cc/calls/{call_id}/end

5. Reports

5.1 Call Reports

GET /cc/reports/calls:

Filters: time range, queue, agent, direction (inbound/outbound)

Metrics: call count, average duration, answer rate, abandonment rate

5.2 Agent Reports

GET /cc/reports/agents:

Per agent: call count, total duration, average duration, idle rate

5.3 Trend Charts

APIChart
GET /cc/reports/charts/sla-trendSLA trend
GET /cc/reports/charts/call-volumeCall volume trend
GET /cc/dashboard/timeseriesDashboard time series
GET /cc/dashboard/summaryDashboard summary data

5.4 Export

APIFormat
GET /cc/reports/calls/exportCSV
GET /cc/reports/agents/exportCSV

6. Prometheus Metrics

CC exposes the following metrics:

MetricTypeDescription
cc_calls_totalCounterTotal calls
cc_call_duration_secondsHistogramCall duration
cc_queue_lengthGaugeCurrent queue count
cc_agents_availableGaugeAvailable agents
cc_sla_percentageGaugeSLA rate
cc_wait_duration_secondsHistogramWait duration