Call Route
From
${call.callerNumber || 'Unknown caller'}
${directionIcon(call.direction)}
To
${call.calleeNumber || 'System'}
${call.legs.length} ${call.legs.length === 1 ? 'leg' : 'legs'}
${call.providerUsed || 'system handled'}
started ${fmtTime(call.startedAt)}
Session
State
${STATE_LABELS[call.state] || call.state}
Direction
${call.direction}
Duration
${fmtDuration(call.duration)}
Provider
${call.providerUsed || '--'}
${call.legs.length
? html`
${call.legs.map(
(leg) => html`
${LEG_TYPE_LABELS[leg.type] || leg.type}
${STATE_LABELS[leg.state] || leg.state}
${leg.id}
Codec
${leg.codec || '--'}${leg.transcoding ? ' (transcode)' : ''}
RTP Port
${leg.rtpPort ?? '--'}
Remote Media
${leg.remoteMedia || '--'}
Packets In
${leg.pktReceived}
Packets Out
${leg.pktSent}
`,
)}
`
: html`
No legs reported yet. SIP/system legs should appear here as soon as the call is wired.
`}