The audio formats supported by sox are listed by sox -h. If the codec was G711u ( PCMU) with sample rate 8000: sox -t ul -r 8000 -c 1 call.rtp call.wav Tools like sox or ffmpeg can be used to convert from call.rtp file to wav format, depending on the codec that was used in the call. If the pcap has the recordings from many calls, then you have to identify the calls and their RTP streams by source/destination IPs or SSRC and build the filter accordingly, for example if SSRC is 0x7f029328: tshark -n -r call.pcap -2 -R rtp -R "rtp.ssrc = 0x7f029328" -T fields -e rtp.payload | tr -d '\n',':' | xxd -r -ps >call.rtp If you have a single call recording in the pcap, so all rtp packets belong to it, try with: tshark -n -r call.pcap -2 -R rtp -T fields -e rtp.payload | tr -d '\n',':' | xxd -r -ps >call.rtp On Linux, extracting the RTP packets from PCAP file is possible with tshark together with shell tools tr and xxd, but then you might need other tools to convert to an audio format.
0 Comments
Leave a Reply. |