@extends('layouts.app') @php $deviceType = $endpoint->description ?? 'sip_phone'; $deviceLabels = [ 'sip_phone' => ['SIP Phone', 'blue', 'phone'], 'web_phone' => ['Web Phone', 'cyan', 'monitor'], 'mobile_app' => ['Mobile App', 'violet', 'smartphone'], 'teams' => ['Teams', 'violet', 'users'], ]; $dtInfo = $deviceLabels[$deviceType] ?? $deviceLabels['sip_phone']; $extId = $endpoint->id ?? ''; $isWebRTC = in_array($deviceType, ['web_phone', 'mobile_app']); $transportLabel = match (true) { str_contains((string)($endpoint->transport ?? ''), 'wss') => 'WSS / TLS', str_contains((string)($endpoint->transport ?? ''), 'ws') => 'WS', str_contains((string)($endpoint->transport ?? ''), 'tcp') => 'TCP', default => 'UDP', }; $typeColors = [ 'blue' => ['bg' => 'rgba(37,99,235,.1)', 'color' => '#2563eb'], 'cyan' => ['bg' => 'rgba(6,182,212,.1)', 'color' => '#0891b2'], 'violet' => ['bg' => 'rgba(124,58,237,.1)', 'color' => '#7c3aed'], ]; $tc = $typeColors[$dtInfo[1]] ?? $typeColors['blue']; // Routing variables $rMode = $routing->routing_mode ?? 'system_default'; $rPrimary = $routing->outbound_trunk_id ?? null; $rFailover = $routing->failover_trunk_id ?? null; $rFailEn = (bool) ($routing->enable_trunk_failover ?? false); @endphp @section('content') {{-- ── Page header ── --}}
| Device | Username | Type | Status | IP / User Agent | Ring | Actions |
|---|---|---|---|---|---|---|
|
{{ $dev->label ?? ucfirst(str_replace('_', ' ', $dev->device_type)) }}
@if($dev->is_primary)
PRIMARY
@endif
|
{{ $dev->endpoint_id }}
|
{{ ucfirst(str_replace('_', ' ', $dev->device_type)) }} | {{ $dev->reg_status }} | @if($dev->reg_ip) {{ $dev->reg_ip }} @endif @if($dev->user_agent) @endif @if(!$dev->reg_ip && !$dev->user_agent) — @endif |
@if($dev->is_teams_virtual ?? false)
{{ $dev->ring_on_incoming ? 'YES' : 'NO' }}
@else
ring_on_incoming ? 'checked' : '' }}
data-device-id="{{ $dev->id }}"
data-ext="{{ $extId }}"
style="cursor:pointer;">
@endif
|
@if($dev->is_teams_virtual ?? false)
|
| No devices mapped. The primary device will be created automatically. | ||||||