Gamma-ray spectroscopy measurements of fast ions on ASDEX Upgrade