Solving certain queueing problems modelled by Toeplitz matrices