Exact boundary conditions for scattering problems