A new device in the optimization of queuing systems is introduced by using the method of phases. Non-exponential queues under control are considered with respect to the expected discounted reward criterion. For models with hyper-Erlang distributions equivalent phase-type systems are established. Approximation results for Markov decision models allow the extension to the case of general distribution functions. The approach is demonstrated by finding the form of an optimal policy for the GI/M/c queue with customer admission and batch arrival as well as for the GI/M/1 queue with interarrival time control.