Ask Your Question

Revision history [back]

How to get the corresponding rtp load through a known phone number and convert it to wav

I am trying to use tshark for an experiment.Using a known phone number, use tshark to get the rtp load of the call after the call is hung up, and convert it into a wav file.

My current workflow is as follows´╝Ü 1.Record the pcap when the call occurs by running the -f and -w of the tshark command. 2.Copy pcap through rsync -auz, because the tshark command that records the pcap file does not stop. 3.Get sip.Call-ID and sip.display.info by running the tshark command -Y sip.Method == BYE. 4.Filter out the sip.Call-ID corresponding to the phone number from sip.display.info through the known phone number. 5.Run the tshark command via sip.Call-ID -Y sip.Method == INVITE to get frame.number. 6.Run the tshark command -Y rtp.setup-frame through frame.number to get ssrc 7.Run the tshark command through ssrc to get the rtp.payload and convert it to a wav file.

Such a process is very inefficient. I would like to ask if there is any efficient way?

sorry about my English.Thanks and Best Regards.