@extends('layouts.app') @section('content')

Call Analytics

AI-powered insights from call recordings and transcripts.
@if (session('success'))
{{ session('success') }}
@endif
Total Calls

{{ $totalCalls }}

Avg Duration

{{ $avgDuration }}s

With Transcripts

{{ $withTranscripts }}

Risky Calls

{{ $riskyCalls }}

Sentiment Breakdown
@if(!empty($sentimentBreakdown)) @php $totalSentiment = array_sum($sentimentBreakdown); $positivePct = $totalSentiment > 0 ? round(($sentimentBreakdown['positive'] ?? 0) / $totalSentiment * 100) : 0; $negativePct = $totalSentiment > 0 ? round(($sentimentBreakdown['negative'] ?? 0) / $totalSentiment * 100) : 0; $neutralPct = $totalSentiment > 0 ? round(($sentimentBreakdown['neutral'] ?? 0) / $totalSentiment * 100) : 0; @endphp
Positive {{ $sentimentBreakdown['positive'] ?? 0 }} ({{ $positivePct }}%)
Neutral {{ $sentimentBreakdown['neutral'] ?? 0 }} ({{ $neutralPct }}%)
Negative {{ $sentimentBreakdown['negative'] ?? 0 }} ({{ $negativePct }}%)
@else

No sentiment data available.

@endif
Top AI Tags
@if($topTags->isNotEmpty())
    @foreach($topTags as $tag)
  • {{ $tag->tag }} {{ $tag->count }}
  • @endforeach
@else

No AI tags data available.

@endif
Per-Extension Metrics
@if($extensionMetrics->isNotEmpty())
@foreach($extensionMetrics as $metric) @php $netSentiment = ($metric->positive ?? 0) - ($metric->negative ?? 0); $sentimentColor = $netSentiment > 0 ? 'text-success' : ($netSentiment < 0 ? 'text-danger' : 'text-secondary'); @endphp @endforeach
Extension Total Calls Avg Duration Positive Negative Net Sentiment
{{ $metric->extension }} {{ $metric->total_calls }} {{ round($metric->avg_duration ?? 0, 1) }}s {{ $metric->positive ?? 0 }} {{ $metric->negative ?? 0 }} {{ $netSentiment }}
@else

No extension metrics available.

@endif
@endsection