A technique for recovering the acoustic impedance of layered media from its impulse transmission response is presented. A model for evaluation of the reflection response [R. A. Tenenbaum and M. Zindeluk, J. Acoust. Soc. Am. 92, 3364--3370 (1992)] is extended to the transmission problem, leading to an algorithm where the amplitudes of the transmitted signal samples, H[inf i], are given by polynomials, P[inf i], of the refection coefficients, R[inf i], as H[inf i]=P[inf i](R[inf 1],...,R[inf N]). For identification purposes, that relation leads to a highly nonlinear system. To solve it, extra information is needed: The inhomogeneity is considered to be inserted in a homogeneous medium, which yields Q(R[inf 1],...,R[inf N])=(product)[inf k=0][sup N](1+R[inf k])/(1-R[inf k])=1. A cost function is then defined as the quadratic difference between the measured transmitted signal and a synthetic one, given by P[inf i], that is, S=(summation)[inf i=0][sup N](P[inf i][sup 2]-H[inf i][sup 2])+Q[sup 2]-1, which is minimized. This is a delicate process, since the Hessian of S is not always positive-definite, requiring the use of smart methods of optimization, such as Levenberg--Marquardt. S may have much local minima, to where minimization methods can converge, leading to the wrong results. This problem is solved by taking successive random initial estimates, and checking to see if the final value of S matches a global minimum criterion.