A time-harmonic acoustic inverse scattering problem involving smart obstacles is formulated and a method to solve it is proposed. A smart obstacle is an obstacle that, when hit by an incoming acoustic wave, tries to pursue a given goal circulating a suitable pressure current on its boundary. A pressure current is a quantity whose physical dimension is pressure divided by time. The goals pursued by the smart obstacles that we have considered are the following ones: to be undetectable or to appear with a shape and/or acoustic boundary impedance different from its actual ones eventually in a location in space different from the actual location. The following time-harmonic inverse scattering problem is considered: from the knowledge of several far fields generated by the smart obstacle when hit by known time-harmonic waves, the knowledge of the goal pursued by the smart obstacle and of its acoustic boundary impedance reconstruct the boundary of the obstacle. A method to solve this inverse problem that generalizes the so-called Herglotz function method is proposed. Some numerical experiments that validate the method proposed are presented. The website http://www.econ.univpm.it/recchioni/w13 contains some auxiliary material that helps the understanding of the current paper