This is a static, read-only archive of Wireshark Q&A. Older questions and answers from October 2017 and earlier can be found at osqa-ask.wireshark.org.
0

How wireshark decodes RTP packets from UDP

asked Nov 23 '20

Hello,

I'm interested how Wireshark decodes RTP packets (which criteria is used to separate them from UDP). I'm trying to create a RTP packet flow using scapy, I' entering all the information needed in RTP hrader:

while seq < 10:
  ip_layer = IP(src = "10.0.1.21", dst = "10.0.1.40")
  udp_layer = UDP(sport = 16998, dport = 17000)
  rtp_layer = RTP(version=2, padding=0, extension=0, marker=1, payload_type=8, sequence=seq, timestamp=10, sourcesync=0)
  packet = ip_layer/udp_layer/rtp_layer
  send(packet)
  seq = seq + 1
  time_s = time_s + 160

and still packets in wireshark are shown as UDP. I found an option in Preferences -> Protocols -> RTP "Payload Type for RFC2198" = 99 and wondered what 99 means (as didn't find any information on RFC document), maybe I need to add some kind of a special payload next to RTP header?.. Any help would be appreciated. Thanks in advance

2 Answers

0

answered Nov 23 '20

TCP and UDP protocols are dissected based on port or heuristics. In your case you can do "Decode as" and select RTP to dissect the packet as RTP. You can also activate the heuristic for RTP. Heuristic = guessing the protocol by looking at packet data. The RTP heuristic is weak meaning it often makes mistakes and labels packt as RTP even if they are not. In case of RTP Wireshark also looks at control signaling if present (like SIP and SDP) if present and dissects the traffic on the port and IP combination as RTP.

Comments

Here is what I do: Analyze -> Enabled Protocols Search for 'rtp' Enable rtp_udp

User 23615 ( Nov 23 '20 )

Thanks, this worked perfectly!

User 52174 ( Nov 23 '20 )
0

answered Nov 20 '25

In addition to this answer, go "Analyse" then "enabled Protocols" search for "rtp". Make sure all check boxes are checked. This needs to be checked and modified after each new Wireshark install or update

cc-by-sa Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.