A non-stationary isentropic filtration of gases in porous media is considered. Thermodynamics in terms of contact and symplectic geometries is briefly discussed. Algebra of symmetries for the PDE system is found, and the classification of media with respect to admissible symmetries is given. Solution for one class of media is found and the phase transitions for this solution are studied.