  In this paper we consider a class of nonlinear wave equation with
$x$-dependent coefficients and prove existence of families of time-periodic
solutions under the general boundary conditions. Such a model arises from the
forced vibrations of a nonhomogeneous string and the propagation of seismic
waves in nonisotropic media. The proofs are based on a Lyapunov-Schmidt
reduction together with a differentiable Nash-Moser iteration scheme.
