A method for determining the complete higher-order scattering matrix of an acoustic discontinuity is developed. The method is demonstrated for a right-angled waveguide bend, and the magnitude and phase of the reflection and transmission coefficients are extracted precisely. The procedure is straightforward and based on the solutions to the Helmholtz equation by the finite element method (FEM). The consistency of the scattering coefficients found by this method is verified by their properties of symmetry, and their accuracy is established by the conservation of energy. The reliability of the new technique is further proved by means of an arbitrary sound source and by comparing the direct FEM response to the reflection matrix calculation. Some features of the scattering matrix as a function of frequency are surprising, such as the steps and reversion of the phase evolution or the complete loss of transmission of the incoming wave. The methodology detailed in this paper can be extended to other multiport junctions, such as T-junctions or size discontinuities in ducts.