To monitor Real-Time Transport Protocol (RTP) and Real-Time Control Protocol (RTCP) packets on media gates, the VPG uses RTP and RTCP application layer gateway (ALGs) that are attached to flows when the PGC installs media gates on the VPG.
The RTP ALG uses the sequence number of each RTP packet on that flow to record the number of lost packets. Each RTP packet contains a 16-bit sequence number field that is incremented for every packet sent. The starting sequence number is randomly selected.
The RTCP ALG monitors the Sender Report and Receiver Report packet types. For the sender, the ALG records the Synchronization Source (SSRC) value and the number of invalid packets, sender packets, and sender octets.
For the receiver, the RTCP ALG records monitors lost packets, the fraction of lost packets, and jitter. When the ALG tracks multiple receiver reports (that is, when a sender is listening to media from multiple sources), it tracks the statistics for up to four sources. When more than four sources are available, the ALG overwrites the statistics for the source with the oldest record.