The paper studies sources of wage dispersion in a model that allows for sorting in firm-worker matches. The model is a general equilibrium on-the-job search model with wage formation similar to that of Cahuc, Postel-Vinay, and Robin (2006). Workers differ in their permanent skill level and firms differ with respect to productivity. As shown in Lentz (2007), in this setting, positive (negative) sorting results if the match production function is supermodular (submodular). If the production function is modular, no sorting obtains. We propose an identification strategy that allows identification of not only the presence of sorting in matching, but also the type of sorting, negative or positive. Like Eeckhout and Kircher (2008) we find that the commonly used wage decomposition in Abowd, Kramarz, and Margolis (1999) does not in itself identify sorting, although the mechanisms that lead to lack of identification in our model differ from that of the partnership model studied in Eeckhout and Kircher (2008).