First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

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.

lurry412's avatar
1
lurry412
asked 2020-11-24 06:10:33 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

So you're trying to build a SIP call recorder? If you want to do this from Tshark components than this is basically the way to do that. Adding a lot a scripting can automate this process. As you can tell from this, Tshark wasn't build for this.

Jaap's avatar
13.7k
Jaap
answered 2020-11-24 08:37:47 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer