The Constrained-Routing and Spectrum Assignment (C-RSA) problem arises in the design of 5G telecommunication optical networks. Given an undirected, loopless, and connected graph G, an optical spectrum of available contiguous frequency slots \({\mathbb {S}}\) , and a set of traffic demands K, the C-RSA consists of assigning, to each traffic demand \(k\in K\) , a path in G between its origin and destination, and a subset of contiguous frequency slots in \({\mathbb {S}}\) subject to certain technological constraints while optimizing some linear objective function. In this paper, we devise an exact algorithm to solve the C-RSA. We first introduce an extended integer programming formulation for the problem. Then we investigate the associated polytope and introduce several classes of valid inequalities. Based on these results, we devise a Branch-and-Cut-and-Price algorithm for the problem and present an extensive computational study. This is also be compared with a Branch-and-Cut algorithm of the state-of-the-art.