Monitoring RTP and RTCP Traffic
To monitor Real-Time Transport Protocol (RTP) and Real-Time Control Protocol (RTCP) packets on media gates, the virtual BGF uses RTP and RTCP application layer gateway (ALGs) that are attached to flows when the gateway controller installs media gates on the virtual BGF.
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.
You can enable RTP and RTCP ALGs for twice NAT flows created when the gateway controller installs media gates on the virtual BGF. The ALGs monitor packets on the gate and provide statistics.
You can enable these ALGs only for flows created by the virtual BGF. You cannot enable them within standalone NAT rules.
You can choose to monitor either RTP or RTCP media flows, or both. To enable monitoring of RTP and RTCP media flows:
- Access the configuration of your virtual BGF.[edit services pgcp]user@host# edit gateway bgf-1
- Enable monitoring of both RTP and RTCP
for media flows.[edit services pgcp gateway bgf-1]user@host# set monitor media
- Enable monitoring of only RTP media flows.[edit services pgcp gateway bgf-1]user@host# set monitor media rtp
- Enable monitoring of only RTCP media
flows. [edit services pgcp gateway bgf-1]user@host# set monitor media rtcp
- In operational mode, view statistics
gathered for RTP and RTCP.
user@host> show services pgcp gate gateway bgf-1 gate-id 352187384065 statisticsGate Statistics: ================ Output packets: 582 Input packets: 582 Dropped packets: 0 Lost RTP packets: 0 RTCP statistics: SSRC : 32270 Sender octets : 7500 Sender packets : 375 Invalid packets: 9 RTCP Receiver statistics: SSRC Lost packets Lost fraction Jitter 13043 0 0.000 0 16487 0 0.000 0 5655 0 0.000 0 . . .
