We study the Mediastreamer2 VoIP engine. Part 8

Article material taken from my zen channel .



RTP packet structure


In a previous article, we used TShark to capture the RTP packets exchanged between our receiver and transmitter. Well, in this we will colorize the elements of the package in different colors and talk about their purpose.


Take a look at the same package, but with tinted fields and with explanatory inscriptions:


, RTP-, UDP- ( ). RTP-, , RTP-. . u- (-), .. 1 . , (8000 ), 50 RTP- 160 . , , 10 .


, , . , , Padding (). RTP-, . , 0xFF β€” u-law.


RTP- 12 , :


  • (RTP-), 12 , . ( Contributing source identifiers count) . 4 , 15 . 4 . -.


  • . X. , ( ), , . . β€” . - , RTP-. , . ED-137 ( Interoperability Standards for VoIP ATM Components ).



. RTP-, .



VER β€” ( 2);


P β€” , , RTP- ;


X β€” , ;


CC β€” CSRC-, ( 1..3), ;


M β€” ( ). , ;


PTYPE β€” ;


Sequence number β€” , , . , , RTP- . ;


Timestamp β€” . , .. 160 , 160. ;


SSRC β€” , . RTP-.


RTP-, , TShark, . , RTP- . TShark "-f". 8010:
-f "udp port 8010"
"" . , , . "", "" .. .


, TShark , , TShark tee. - less, vim , , RTP-.


If you need to listen to the signal transmitted by the RTP stream, then you need to use the TShark version with the Wireshark visual interface . Through simple manipulations of the mouse, you can listen there, see the waveform of the signal. But on one condition - if it will be encoded in u-law or a-low format.


In the next article, we will make a duplex intercom with you. Stock up on a pair of headsets and one interlocutor.


All Articles