Identification of trapping mechanisms in amorphous compounds using cavity perturbation techniques