Optical absorption spectroscopy of defects in halides