Reputation: 151
I got a pcap file with voip conversation, how i can separate RTP packets from the other packets?
I can obtain sip packets, but I can't differenciate the RTP packets from the rest.
Upvotes: 4
Views: 3505
Reputation: 486
An open source software that extract the RTP/RTCP packets from a pcap file are:
From the source code you can view and understand the methodologies used.
I can obtain sip packets, but I can't differenciate the RTP packets from the rest.
If you are able to decode the SIP, then you can find (inside INVITE message) the SDP message. If you decode it you can find the IP and PORT of RTP "stream" (and RTCP => port + 1). With these informations you can identify uniquely the RTP and RTCP packets. Keep in mind that there are often packages (with the same IP-PORT) with the STUN protocol which must be separate from RTP. You have to consider where is the packet capture (network context and constraints), you may take into account NAT.
Upvotes: 0
Reputation: 16256
Check @macs recommendation about PCap filter. If this cannot satisfy your needs (e.g. you need to filter out RTP packets of specific SIP session) there's no simple way. You need to parse SIP messages, retrieve RTP port numbers, takes packets going to/from these ports in particular time period and (optionally) check if these packets are RTP by checking their headers (magic number
in headers)
Upvotes: 1
Reputation: 31
If you want to see the RTP traffic in wireshark then:
Hope that helps. :)
p.s. edited to note that this is for Wireshark. Thanks to a commentor for pointing that out!
Upvotes: 2