There are different-length cables available for different-height handlebars. It is possible you have a cable that is longer than necessary?
Be creative when it comes to routing, so long as it follows a straightforward path, eliminating any possible kinks.