Most networks experience periodic packet loss and congestion at some point, even if they are highly managed. Some codecs are more susceptible to packet loss than others due to their algorithmic design, but some basic rules can be followed to increase resiliency and quality. It is strongly recommended to use 20ms ptime for all codecs to help increase packet stream resiliency and lower latency. Using ptimes such as 30ms or 60ms increases end-to-end delay and reduces resiliency to packet loss, which in turn can impact QoS. Using higher ptimes for bandwidth savings is often not worth the tradeoff.
It is also important to note, some codecs suffer from excessive tandem encoding degradation even in perfect network conditions. This occurs when multiple media hops are present in the network, and a codec is decoded and encoded again at each hop before being sent on towards the remote endpoint. This degradation can be severe enough that just one tandem encode can reduce voice quality. G.729 is especially susceptible to tandem encoding degradation and should be used with caution when multiple media hops are present in the network.