Spectroscopy of one-dimensionally inhomogeneous linear absorbing media with arbitrary frequency dispersion