Analytic solutions of the Klein-Gordon equation in a semi-infinite channel