To explore the effect of the head-on collision (such as phase shifts, collisional processes, and production of solitons) of ion-acoustic waves (IAWs), a collisionless unmagnetized electron-positron-ion (e-p-i) plasma is considered. The electrons and positrons follow the generalized () distribution. To do this, using the extended Poincaré-Lighthill-Kuo (ePLK) approach, the two-sided Korteweg-de Vries (KdV) equations and phase shifts are derived. The main aim of this study is to investigate the consequence of spectral indices and on both the negative and positive phase changes following an IAW-to-IAW collision. It is found that for the effects of the spectral indices of electrons and positrons both positive and negative phase shifts after head-on collisions are modified. The compressive (only hump-shaped) as well as rarefactive (both hump and dip-shaped) solitons become produced for the effect of spectral indices. The results obtained in the study may be helpful to understand the collision processes as well as the consequence of the head-on collision of IAWs in electron-positron-ion plasmas in the ionosphere, auroral acceleration regions, solar wind, Saturn rings, active galactic nuclei, polar cup of fast rotating neutron stars, semiconductor plasmas, and intense laser fields as well as in laboratory experiment.