A method to solve an acoustic inverse scattering problem involving smart obstacles