view doc/RTP-analysis @ 153:14b627682458

gsmfr-decode-r utility put together
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 14 Dec 2022 23:11:20 +0000
parents 8eb0e7a39409
children aaa0380f9958
line wrap: on
line source

The present package includes a utility named rtp-gsmfr-extr; this utility
extracts a single RTP stream in either FR1 or EFR codec format from a pcap file,
presumably captured with tcpdump on an IP network serving either an IP-based BTS
or a gateway from an E1-based BTS to RTP - the intent is to extract a GSM call
uplink that has been rendered into an RTP stream by a BTS.  The RTP stream being
extracted must be fully continuous without any gaps, using Themyscira
RTP-BFI-extension BFI marker packets in those 20 ms windows where no good
traffic frame has been received.  rtp-gsmfr-extr verifies continuity of the RTP
stream being extracted: any detected discontinuity (either a sequence number
jump indicating packet loss or a timestamp jump indicating an intentional gap
generated at the source) will be reported, and the extraction will stop there.

To run rtp-gsmfr-extr, you need to have a pcap file (obviously), and you need to
identify the RTP stream to be extracted by either source or destination IP:port.
rtp-gsmfr-extr will look at every UDP packet that matches this src-IP-port or
dest-IP-port filter, and then check for valid RTP, verify the expected increment
in sequence and timestamp numbers, check for either FR1 or EFR payload (or a
Themyscira BFI marker for FR & EFR), and finally write the extracted frame
stream to a gsmx file.  This gsmx output can then be analyzed with gsmrec-dump,
or decoded to playable WAV with gsmfr-decode or gsmefr-decode.