A closed-loop voice-over-Internet-Protocol (VoIP) system has a local and a
remote VOIP application. Each VOIP application monitors incoming packet
arrival times and durations of audio data in the incoming packets to
estimate bandwidth. The bandwidth estimates are forwarded to the other
VOIP application. The forwarded bandwidth estimates are compared to a
sending bandwidth. When the bandwidth estimate is above the sending
bandwidth, compression and audio-frame decimation are reduced to improve
voice quality. When the bandwidth estimate falls below the sending
bandwidth, audio compression and decimation are increased to improve
efficiency. Packet size can also be increased. Congestion estimates can
also be sent with the audio data, causing packet transmission to pause
until congestion ends. Incoming packet latencies are compared to a moving
average to determine the congestion estimate, while bandwidth estimates
are made by comparing packet audio duration to time between packet
arrivals.