Context. Recent studies of O-type stars have demonstrated that discrepant mass-loss rates are obtained when different diagnostic methods are employed. Fitting the unsaturated UV resonance lines (e.g., P v) gives drastically lower values than obtained from the Hα emission. Wind inhomogeneity (so-called "clumping") may be the main cause of this discrepancy. Aims. In a previous paper, we presented 3D Monte-Carlo calculations for the formation of scattering lines in a clumped stellar wind. In the present paper we select five O-type supergiants (from O4 to O7) and test whether the reported discrepancies can be resolved this way. Methods. In the first step, the analyses started with simulating the observed spectra with Potsdam Wolf-Rayet (PoWR) non-LTE model atmospheres. The mass-loss rates are adjusted to fit to the observed Hα emission lines best. For the unsaturated UV resonance lines (i.e., P v) we then applied our 3D Monte-Carlo code, which can account for wind clumps of any optical depths ("macroclumping"), a non-void interclump medium, and a velocity dispersion inside the clumps. The ionization stratifications and underlying photospheric spectra were adopted from the PoWR models. The properties of the wind clumps were constrained by fitting the observed resonance line profiles.Results. Our results show that with the mass-loss rates that fit Hα (and other Balmer and He ii lines), the UV resonance lines (especially the unsaturated doublet of P v) can also be reproduced with no problem when macroclumping is taken into account. There is no need to artificially reduce the mass-loss rates or to assume a subsolar phosphorus abundance or an extremely high clumping factor, unlike what was claimed by other authors. These consistent mass-loss rates are lower by a factor of 1.3 to 2.6, compared to the mass-loss rate recipe from Vink et al.
Conclusions.Macroclumping resolves the previously reported discrepancy between Hα and P v mass-loss diagnostics.