The reflection and transmission of acoustic waves along a waveguide of uniform width by a metamaterial cavity is considered. The metamaterial is comprised of a closely spaced array of micro-channels separated by thin plates between which the field may be damped. Exact equations governing the field in the microstructured metamaterial cavity are replaced by an effective field using the homogenisation approach. This allows a solution to be formulated in terms of an integral equation across the interface between the metamaterial cavity and the waveguide. Attention focuses on the resonant and damping effects of a metamaterial cavity of tapered height where rainbow trapping phenomena are encountered. It is shown that near-perfect broadbanded absorption of the incoming wave energy can be achieved.