LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

sngrep

Interactive SIP traffic analyzer

TLDR

Capture SIP traffic
$ sngrep
copy
Capture on interface
$ sngrep -d [eth0]
copy
Read from pcap
$ sngrep -I [capture.pcap]
copy
Filter by SIP method
$ sngrep -c [INVITE]
copy
Capture to file
$ sngrep -O [output.pcap]
copy
Filter by IP
$ sngrep host [192.168.1.100]
copy
Quiet mode
$ sngrep -q
copy

SYNOPSIS

sngrep [-d device] [-I file] [-O file] [options] [filter]

DESCRIPTION

sngrep is a terminal-based tool for capturing and analyzing SIP (Session Initiation Protocol) traffic used in VoIP systems. It provides an interactive ncurses interface that displays active SIP dialogs, call flow diagrams with directional arrows, and full message content including headers and body.The tool captures SIP packets in real time from network interfaces or reads previously captured pcap files for offline analysis. Filters narrow results by SIP method, source or destination address, and custom BPF expressions. Captured traffic can be saved to pcap format for later review or sharing with other analysis tools.Call flow visualization is the tool's standout feature, showing the sequence of SIP messages (INVITE, 200 OK, ACK, BYE) between endpoints with timing information. This makes it particularly effective for diagnosing VoIP call setup failures, registration problems, and codec negotiation issues.

PARAMETERS

-d DEVICE

Capture device.
-I FILE
Read pcap file.
-O FILE
Write pcap file.
-c METHOD
Filter SIP method.
-l
Rotate files.
-N
No interface.
-q
Quiet mode.
-r
Rotate only.

INTERFACE CONTROLS

Arrow keys - NavigateEnter - Show detailsF2 - SaveF7 - FilterF10/q - Quit

CAVEATS

Requires root for capture. TLS traffic needs decryption. High-volume may miss packets.

HISTORY

sngrep was created by Irontec for VoIP troubleshooting. It provides visual SIP analysis in the terminal.

SEE ALSO

tcpdump(1), tshark(1), wireshark(1)

Copied to clipboard
Kai