YAlN is a new member of the group-III nitride family with potential for applications in next generation piezoelectric and light emitting devices. We report the infrared dielectric functions and optical phonons of wurtzite (0001) YxAl1-xN epitaxial films with 0 less than= x less than= 0.22. The films are grown by magnetron sputtering epitaxy on c-plane Al2O3 and their phonon properties are investigated using infrared spectroscopic ellipsometry and Raman scattering spectroscopy. The infrared-active E-1(TO) and LO, and the Raman active E-2 phonons are found to exhibit one-mode behavior, which is discussed in the framework of the MREI model. The compositional dependencies of the E-1(TO), E-2 and LO phonon frequencies, the high-frequency limit of the dielectric constant, epsilon(infinity), the static dielectric constant, epsilon(0), and the Born effective charge Z(B) are established and discussed.