The wave equation approach to the two-dimensional inverse problem for a general bounded domain with piecewise smooth mixed boundary conditions