A voice-over-Internet-Protocol (VoIP) application estimates bandwidth and congestion
of the reception path to the VoIP application from a sending VoIP application.
Packet arrivals are timed and the inter-packet delay is compared to the voice duration
of the data contained in the more recent packet. When the inter-packet delay is
longer than the voice duration the network is slowing and the bandwidth estimate
is reduced. The bandwidth estimate is increased when inter-packet delay is smaller
than the voice duration. Packet latencies are the difference in send and receive
times and are compared to a moving average latency. When the current packet's latency
is longer than the moving average, congestion is detected. When the current packet's
latency equals the moving average, the network has recovered from congestion and
the congestion estimate is reduced. Congestion and bandwidth estimates are added
to packets sent out to provide feedback to the other VoIP application.