Aims - We analyse numerically the propagation and dispersion of acoustic waves in the solar-like sub-photosphere with localised non-uniform magnetic field concentrations, mimicking sunspots with various representative magnetic field configurations. Methods - Numerical simulations of wave propagation through the solar sub-photosphere with a localised magnetic field concentration are carried out using SAC, which solves the MHD equations for gravitationally stratified plasma. The initial equilibrium density and pressure stratifications are derived from a standard solar model. Acoustic waves are generated by a source located at the height corresponding approximately to the visible surface of the Sun. By means of local helioseismology we analyse the response of vertical velocity at the level corresponding to the visible solar surface to changes induced by magnetic field in the interior. Results - The results of numerical simulations of acoustic wave propagation and dispersion in the solar sub-photosphere with localised magnetic field concentrations of various types are presented. Time-distance diagrams of the vertical velocity perturbation at the level corresponding to the visible solar surface show that the magnetic field perturbs and scatters acoustic waves and absorbs the acoustic power of the wave packet. For the weakly magnetised case, the effect of magnetic field is mainly thermodynamic, since the magnetic field changes the temperature stratification. However, we observe the signature of slow magnetoacoustic mode, propagating downwards, for the strong magnetic field cases.