diff --git a/internal/tui/model.go b/internal/tui/model.go index 60ab3c5..52d69e1 100644 --- a/internal/tui/model.go +++ b/internal/tui/model.go @@ -629,20 +629,32 @@ func (m Model) renderCallDetail() string { b.WriteString(fmt.Sprintf("State: %s\n", flow.State)) b.WriteString(fmt.Sprintf("Packets: %d\n\n", len(flow.Packets))) + // Network Summary Section + b.WriteString("Network Layer:\n") + // Find first packet to get initial IPs + if len(flow.Packets) > 0 { + first := flow.Packets[0] + srcLabel := m.networkMap.LabelForIP(first.SourceIP) + dstLabel := m.networkMap.LabelForIP(first.DestIP) + + b.WriteString(fmt.Sprintf(" Source: %s (%s:%d)\n", srcLabel, first.SourceIP, first.SourcePort)) + b.WriteString(fmt.Sprintf(" Destination: %s (%s:%d)\n", dstLabel, first.DestIP, first.DestPort)) + } + b.WriteString("\n") + b.WriteString("Transaction Flow:\n") for i, pkt := range flow.Packets { arrow := "→" - if !pkt.IsRequest { + // Simple direction indicator based on whether it matches initial source + if len(flow.Packets) > 0 && pkt.SourceIP != flow.Packets[0].SourceIP { arrow = "←" } // Format timestamp ts := pkt.Timestamp.Format("15:04:05.000") - // Detailed packet info line - b.WriteString(fmt.Sprintf(" %d. [%s] %s %s %s:%d -> %s:%d\n", - i+1, ts, arrow, pkt.Summary(), - pkt.SourceIP, pkt.SourcePort, pkt.DestIP, pkt.DestPort)) + // Clean packet info line (Timestamp + Arrow + Method/Status) + b.WriteString(fmt.Sprintf(" %d. [%s] %s %s\n", i+1, ts, arrow, pkt.Summary())) // Show SDP info if present if pkt.SDP != nil { diff --git a/logs/2026-01-19_14-32-58.log b/logs/2026-01-19_14-32-58.log index 359a7ed..3f46cbf 100644 --- a/logs/2026-01-19_14-32-58.log +++ b/logs/2026-01-19_14-32-58.log @@ -173,3 +173,4 @@ [14:33:09.310] [DEBUG] PcapReader: Packet 24 detected as SIP, parsing... [14:33:09.312] [INFO] PcapReader: Found SIP packet 24: 200 e9270b7c047542ef9af488d27b82162e [14:33:09.314] [INFO] PcapReader: Finished reading. Total packets: 24, SIP packets: 24 +[14:35:22.258] [INFO] Telephony Inspector exited normally