  In order to analyse the role of the quasiparticle-phonon interaction in the
origin of nuclear gap, we applied an approach which is similar to the
Eliashberg theory for usual superconductors. We obtained that the averaged
contribution of the quasiparticle-phonon mechanism to the observed value of the
pairing gap for $^{120}$Sn is 26% and the BCS-type mechanism gives 74% . Thus,
pairing is of a mixed nature at least in semi-magic nuclei -- it is due to the
quasiparticle-phonon and BCS mechanisms, the first one being mainly a surface
mechanism and the second one mainly a volume mechanism. The calculations of the
strength distribution for the odd-mass nuclei $^{119}Sn$ and $^{121}Sn$ have
shown that the quasiparticle-phonon mechanism mainly improves the description
of the observed spectroscopic factors in these nuclei.
  For the case of nuclei with pairing in both proton and neutron systems it is
necessary to go beyond the Eliashberg-Migdal approximations and include the
vertex correction graphs in addition to the rainbow ones. The estimations for
spectroscopic factors performed within a three-level model have shown that the
contribution of the vertex correction graphs was rather noticeable.
