@extends('layouts.app', ['title' => 'Calls']) @section('content') @php($canManage = auth()->user()->can('contacts.manage'))

Calls

One call dashboard across all your telephony providers.

@if ($providers->where('is_active', true)->isEmpty()) ● Connect calls @else ● {{ $providers->where('is_active', true)->pluck('label')->implode(', ') }} @endif @if ($canManage) @endif
@error('call')
{{ $message }}
@enderror
Period: @foreach (['today' => 'Today', '7d' => 'This week', 'month' => 'This month', 'custom' => 'Custom'] as $k => $v) {{ $v }} @endforeach @if ($range === 'custom') @endif {{ $rangeLabel }}
@foreach ([['Total calls', $stats['total'], 'bi-telephone'], ['Connected', $stats['connected'], 'bi-check-circle'], ['Missed', $stats['missed'], 'bi-telephone-x'], ['Talk time', sprintf('%d:%02d', intdiv($stats['talk'], 60), $stats['talk'] % 60), 'bi-clock'], ['Unique clients', $stats['clients'], 'bi-person'], ['Agents active', $stats['agents'], 'bi-headset']] as [$l, $v, $i])
{{ $l }}
{{ $v }}
@endforeach
@if (in_array($tab, ['logs', 'recordings'], true))
@foreach (['tab', 'range', 'from', 'to'] as $keep)@endforeach
@if ($calls->isEmpty())
No calls found. Connect a provider or adjust your filters.
@else
@foreach ($calls as $call) @endforeach
WhenContactDirectionStatusDurationAgentRecording
{{ $call->started_at?->timezone($currentAccount->timezone)->format('d M, h:i A') }} @if ($call->contact){{ $call->contact->full_name }}@endif
{{ $call->direction === 'inbound' ? $call->from_number : $call->to_number }}
{{ ucfirst($call->direction) }} {{ \App\Models\CallLog::STATUSES[$call->status] ?? $call->status }} {{ $call->durationLabel() }} {{ $call->agent?->name ?? '—' }} @if ($call->recording_url)@else —@endif
{{ $calls->links() }}
@endif
@elseif ($tab === 'agents')
@foreach ($agents as $a) @endforeach
AgentPhoneCallsConnectedTalk time
{{ $a['user']->initials }}{{ $a['user']->name }} {{ $a['user']->phone ?? 'Add a mobile number in My profile' }} {{ $a['calls'] }} {{ $a['connected'] }} {{ sprintf('%d:%02d', intdiv($a['talk'], 60), $a['talk'] % 60) }}
Click-to-call rings the agent's mobile number first, then connects the customer.
@else
@forelse ($providers as $p)
@csrf @method('PUT')
{{ $p->label }} · {{ \App\Models\TelephonyProvider::PROVIDERS[$p->provider]['label'] ?? $p->provider }}
is_active)>
@foreach (\App\Models\TelephonyProvider::PROVIDERS[$p->provider]['fields'] ?? [] as $key => $label)
@endforeach
@csrf @method('DELETE')
@empty
No provider connected yet.
@endforelse
@can('settings.manage')
Connect a provider
@csrf
@foreach (\App\Models\TelephonyProvider::PROVIDERS as $k => $def)
@foreach ($def['fields'] as $key => $label)
@endforeach
@endforeach

Keys are stored encrypted. You get them from the provider's dashboard after KYC.

@endcan
@endif @if ($canManage) @endif @endsection @push('scripts') @endpush