VoIP over Wireless LANs is greatly aff ected by path loss, RF interference and other sources of signal attenuation in addition to network congestion. The primary factors involved in effective real-time communication, namely delay and loss, must be within certain controlled limits in such a scenario. Wireless LAN Access Points must, therefore, act in tune with the codecs to ensure high quality of the ongoing VoIP sessions. In this paper, we analyze the various codec parameters with respect to wireless LAN APs. Thereafter, we develop an optimization algorithm based on proactive strategy to keep loss and latency within tolerable limits. Finally, we implement the algorithm in our test-bed to provide optimum Voice over IP (VoIP) performance.