We present an ab initio study of the recently discovered superconductivity of boron doped diamond within the framework of a phonon-mediated pairing mechanism. The role of the dopant, in substitutional position, is unconventional in that half of the coupling parameter lambda originates in strongly localized defect-related vibrational modes, yielding a very peaked Eliashberg alpha(2)F(omega) function. The electron-phonon coupling potential is found to be extremely large, and T-C is limited by the low value of the density of states at the Fermi level. The effect of boron isotope substitution is explored.