Umm Hani bint Abi Talib narrated that on the day of the conquest of Mecca, the Prophet (peace and blessings of Allah be upon him) bathed in her house and prayed eight rak'ahs. It is agreed upon (24). From Ali (may Allah be pleased with him) that the Prophet (peace and blessings of Allah be upon him) used to perform voluntary prayers during travel. It was narrated by Sa'id (25). One may pray the two rak'ahs of Fajr and the Witr, because Ibn Umar narrated that the Prophet (peace and blessings of Allah be upon him) used to perform the Witr [prayer] while on his camel. And when the Prophet (peace and blessings of Allah be upon him) slept through the Fajr prayer until the sun rose, he prayed the two rak'ahs of Fajr before it. It is agreed upon (26). As for other sunnah prayers and voluntary prayers before and after the obligatory ones, Ahmad said: "I hope that there is no harm in performing voluntary prayers while traveling." It was narrated from Al-Hasan, who said: "The companions of the Messenger of Allah (peace and blessings of Allah be upon him) used to travel and perform voluntary prayers before and after the prescribed prayers" (27). This was also narrated from Umar, Ali, Ibn Mas'ud, Jabir, Anas, Ibn Abbas, Abu Dharr, and many of the Tabi'in. This is the position of Malik, Al-Shafi'i, Ishaq, Abu Thawr, and Ibn al-Mundhir. Ibn Umar, however, would not perform voluntary prayers along with the obligatory prayer, neither before nor after it, except during the middle of the night. This was also reported from Sa'id ibn al-Musayyib, Sa'id ibn Jubayr, and Ali ibn al-Husayn; for it was narrated that Ibn Umar saw people performing voluntary prayers after the prayer, and he said: "If I were to perform voluntary prayers, I would have completed my prayer."
= As for the hadith of Jabir, Muslim did not record it. See Tuhfat al-Ashraf 2/168. Al-Bukhari recorded it in: The Chapter of Turning Toward the Qibla, from the Book of Prayer, and in: The Chapter of Disembarking for the Prescribed Prayer, from the Book of Shortening [the Prayer]. Sahih al-Bukhari 1/110, 2/56. Abu Dawud recorded something similar, and it was mentioned previously in 2/97. As for the hadith of Anas, Al-Bukhari recorded it in: The Chapter of Voluntary Prayer on a Donkey, from the Book of Shortening [the Prayer]. Sahih al-Bukhari 2/56. And Muslim recorded it in: The Chapter of the Permissibility of Performing Voluntary Prayer on a Mount while Traveling, wherever it faces, from the Book of the Traveler's Prayer. Sahih Muslim 1/488. Its takhrij (verification) from Al-Daraqutni was provided previously in 2/93, and its takhrij from Abu Dawud in 2/96. (24) Its takhrij was provided previously in 2/550. (25) Ibn Abi Shaybah recorded something similar from Ibn Umar. See Al-Musannaf 1/382. (26) The first was mentioned previously in 2/96, and the second in 2/348. (27) Recorded by Ibn Abi Shaybah in: The Chapter of He Who Used to Perform Voluntary Prayers while Traveling, from the Book of Prayer. Al-Musannaf 1/381.