The aim of this work is to analyze the gas flow in high pressure buried pipelines subjected to wall friction and heat transfer. The governing equations for one-dimensional compressible pipe flow are derived and solved numerically. The effects of friction, heat transfer from the wall and inlet temperature on various parameters such as pressure, temperature, Mach number and mass flow rate of the gas are investigated. The numerical scheme and numerical solution was confirmed by some previous numerical studies and available experimental data. The results show that the rate of heat transfer has not a considerable effect on inflow Mach number, but it can reduce the choking length in larger f DL / D values. The temperature loss will also increase in this case, if smaller pressure drop is desired along the pipe. The results also indicate that for f DL / D = 150, decreasing the rate of heat transfer from the pipe wall, indicated here by Biot number from 100 to 0.001, will cause an increase of about 7% in the rate of mass flow carried by the pipeline, while for f DL / D = 50, the change in the rate of mass flow has not a considerable effect. Furthermore, the mass flow rate of choked flow could be increased if the gas flow is cooled before entrance to the pipe.