Radiative pion absorption in medium and heavy nuclei