We calculate the spectrum resulting from the interaction of a fireball with ambient soft photons. These photons are assumed to be produced by the walls of a funnel in a massive star. By parametrizing the radial dependence of the funnel temperature we calculate the deceleration of the fireball self-consistently, taking into account the absorption of high energy gamma-rays arising from interactions with the softer ambient photons. The resulting spectrum is peaked at energies that are in agreement with observations, has a nu(2) slope in the X-ray band and a steep power law high energy tail.