The interaction of channeled ions with foreign atoms in crystals