A procedure to characterize beams of a medical linear accelerator for their use in Monte Carlo (MC) dose calculations for intraoperative electron radiation therapy (IOERT) is presented. The procedure relies on dose measurements in homogeneous media as input, avoiding the need for detailed simulations of the accelerator head. An iterative algorithm (EM-ML) has been employed to extract the relevant details of the phase space (PHSP) of the particles coming from the accelerator, such as energy spectra, spatial distribution and angle of emission of particles. The algorithm can use pre-computed dose volumes in water and/or air, so that the machine-specific tuning with actual data can be performed in a few minutes. To test the procedure, MC simulations of a linear accelerator with typical IOERT applicators and energies, have been performed and taken as reference. A solution PHSP derived from the dose produced by the simulated accelerator has been compared to the reference PHSP. Further, dose delivered by the simulated accelerator for setups not included in the fit of the PHSP were compared to the ones derived from the solution PHSP. The results show that it is possible to derive from dose measurements PHSP accurate for IOERT MC dose estimations.