Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Using tshark to extract wav from voip call

I see several command line scripts and old code (that I can't compile) for extracting audio from a PCAP. (extract_rtp.sh, pcap2wav, rtp-break)

I've had issues with some of those and they are not particularly maintained.

However, it seems that the wireshark gui (which is actively maintained) can sufficiently extract an AU file of the audio (which sox should be able to convert). E.g. basic instructions of:

Highlight the RTP Line within Wireshark. Selected Telephony menu item> Select RTP drop down menu item> Select RTP Streams menu item> Highlight both Streams (To/From)> Select Analyze> Select Save> Select Audio> Save as .AU file.

How would I do that with tshark from the CLI? I'm assuming that the wireshark gui is mostly a wrapper around tshark. (Also asked here.)

The closest I see available is tshark -r rtp.pcap -q -z rtp,streams which only gives you stats on each stream.