Packetizer Logo
 

Why do I receive media from some vendors' EPs but not from others'? (Q31)

The information in this article applies to:

An obscure feature in the sockets interface has caused interoperability problems with vendors who use the connect() call followed by calls to send() and write() for UDP media streams instead of just calling sendto() and recvfrom() without connect(). If one uses connect() on a UDP socket (SOCK_DGRAM), only packets sent by the remote entity from the same port as the port on which one connected are passed up through the stack. This means that if the remote entity sends on a different port than on what it receives, the sockets layer in your EP discards all of the incoming packets. The symptom that vendors who are using connect() experience is two-way media with some vendors but one-way media with others. The vendors with which they have two-way media just happen to be sending and receiving on the same port; the vendors with one-way media are sending and receiving on different ports. The solution is to never use connect() for RTP and RTCP channels.