Xavier sets Jeremy right on that carob-like fruit in Ecuador:
Must have been an Inga species (called guaba in Ecuador, not to be confused with guava, the English name for Psidium guajava, or guayaba (its Spanish equivalent). In English the species is referred to as pacay or, more attractive, ice-cream bean (I hope you had a chance to try it…)