A new service called voice over Internet Protocol (VoIP) is becoming a promising application in wireless local network (WLAN). However, VoIP capacity is also limited because of the WLAN environment. To support VoIP service over WLAN, IEEE 802.11e EDCA adjusts three parameters (contention window (CW), arbitration inter-frame space (AIFS), transmission opportunity (TXOP)) to provide a differentiation service (DS) for application flows. However, it is not considered how to optimize those parameters to provide a DS for the access point (AP) and the terminal nodes, although the AP undergoes the higher traffic load and becomes the bottleneck for the VoIP capacity improvement. In this paper, this topic will be handled. A new analytical model is proposed for the VoIP capacity over WLAN. This analytical model, which reflects the ON-OFF model of voice flows and delay bound of voice uplink and downlink flows, can be utilized to differentiate the AP and terminal nodes using the three parameters. Based on the analytical model, two differentiation schemes, called separate differentiation (SD) and joint differentiation (JD), are analyzed in which the SD utilizes one arbitrary parameter and the JD uses two arbitrary parameters to provide differentiation service. As a result, with aid of the analytical model, the optimal values of CW, AIFS and TXOP of two differentiation schemes can be obtained for improving the VoIP capacity according to the different voice codes and different voice packetization intervals. Finally, simulation results confirm that the analytical model is accurate and effective for the optimization of VoIP capacity.