Differential phase observations with a near-IR interferometer offer a way to obtain spectra of extrasolar planets. The method makes use of the wavelength dependence of the interferometer phase of the planet/star system, which depends both on the interferometer geometry and on the brightness ratio between the planet and the star. The differential phase is strongly affected by instrumental and atmospheric dispersion effects. Difficulties in calibrating these effects might prevent the application of the differential phase method to systems with a very high contrast, such as extrasolar planets. A promising alternative is the use of spectrally resolved closure phases, which are immune to many of the systematic and random errors affecting the single-baseline phases. We have modeled the response of the AMBER instrument at the VLTI to realistic models of known extrasolar planetary systems, taking into account their theoretical spectra as well as the geometry of the VLTI. We present a strategy to determine the geometry of the planetary system and the spectrum of the extrasolar planet from closure phase observations in two steps. We show that there is a close relation between the nulls in the closure phase and the nulls in the corresponding single-baseline phases: every second null of a single-baseline phase is also a null in the closure phase. In particular, the nulls in the closure phase do not depend on the spectrum but only on the geometry. Therefore the geometry of the system can be determined by measuring the nulls in the closure phase, and braking the remaining ambiguity due to the unknown system orientation by means of observations at different hour angles. Based on the known geometry, the planet spectrum can then be directly synthesized from the closure phases.