This paper investigates the problem of maximizing the revenue of a telecommunications operator by simultaneously pricing point-to-point services and allocating bandwidth in its network, while facing competition. Customers are distributed into market segments, i.e., groups of customers with a similar preference for the services. This preference is expressed using utility functions, and customers choose between the offers of the operator and of the competition according to their utility. We model the problem as a leader-follower game between the operator and the customers. This kind of problem has classically been modeled as a bilevel program. A market segmentation is usually defined by a discrete distribution function of the total demand for a service; in this case, the problem can be modeled as a combinatorial optimization problem. In this paper, however, we motivate the use of a continuous distribution function and investigate the nonlinear continuous optimization problem obtained in this case. We analyze the mathematical properties of the problem, and in particular we give a necessary and sufficient condition for its convexity. We introduce methods to solve the problem and we provide encouraging numerical results on realistic telecommunications instances of the problem, showing that it can be solved efficiently.