GNOME Bugzilla – Bug 647252
make udpsink generate keep alive packets
Last modified: 2011-04-11 17:05:40 UTC
It is important for VoIP to keep hole in firewall/nat. To do this we need to send some think to get it back. Current empathy ill encode sound (or even silence) and send this stream just to recive other stream. In some situations this produce too big/useless overhead on network. Maximum what we need is empty udp packet. No rtp, or even audio in it. Current speex already has integrated silence detection, and generate empty packets with GAP flag. Current rtpspeexpay will drop this packets (after my patch, see Bug 646474). So probably i should change rtpspeexpay to generate keep alive event on GAP packet. And udpsink if it recive this event should send just empty udp packet.
Key words for this issue are: "UDP hole punching", "NAT traversal"
The next idea is for fallowing schema: Two peers A and B. The peer B connected direct to the internet, without NAT Peer A connected with NAT, so A can recive only if A send keep alive packets. B do need to get this packets. So we can set TTL of keep alive packets to 1 (or what ever it need), just to pass first NAT. So udpsink also need option to set ttl of keep alive packets. Your thoughts?
Correction: "B do _not_ need to get this packets"
Not udpsink's job... If you want a complete NAT traversal solution (including keepalives), use libnice.
You may also be interested by http://tools.ietf.org/html/draft-ietf-avt-app-rtp-keepalive Which recommends using RTP/RTCP muxing (which is also on my todo list for Farsight2)
I guess it's only relevant when ICE is not in use. Nice should generate in-band STUN keepalives. CN payloads (RFC 3389) can also be sent if negotiated by both parties.