Why Does RTP use UDP instead of TCP?

前端 未结 11 1405
南旧
南旧 2020-12-24 07:28

I wanted to know why UDP is used in RTP rather than TCP ?. Major VoIP Tools used only UDP as i hacked some of the VoIP OSS.

11条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-24 07:29

    I'd like to add quickly to what Matt H said in response to Stobor's answer. Matt H mentioned that RTP over UDP packets can be checksum'ed so that if they are corrupted, they will get resent. This is actually an optional feature on most PBXs. In Asterisk, for example, you can enable / disable checksums on your RTP over UDP traffic in the rtp.conf configuration file with the following line:

    rtpchecksums=yes ; or no if you prefer
    

    Cheers!

提交回复
热议问题