كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ
5  
The Book of Mosques and Places of Prayer
(7)
Chapter: The prohibition of speaking during the prayer, and the abrogation of its former permissibility
(7)
باب تَحْرِيمِ الْكَلاَمِ فِي الصَّلاَةِ وَنَسْخِ مَا كَانَ مِنْ إِبَاحَتِهِ ‏
Sahih Muslim 540 a

Jabir reported:

The Messenger of Allah (ﷺ) sent me on an errand. I (having done the business assigned to me came back and) joined him as he was going (on a ride). Qutaiba said that he was saying prayer while he rode. I greeted him. He gestured to me. When he completed the prayer. he called me and said: You greeted me just now while I was engaged in prayer. (Qutaiba said): His (Prophet's face) was towards the east, as he was praying.
حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، حَدَّثَنَا لَيْثٌ، ح وَحَدَّثَنَا مُحَمَّدُ بْنُ رُمْحٍ، أَخْبَرَنَا اللَّيْثُ، عَنْ أَبِي الزُّبَيْرِ، عَنْ جَابِرٍ، أَنَّهُ قَالَ إِنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم بَعَثَنِي لِحَاجَةٍ ثُمَّ أَدْرَكْتُهُ وَهُوَ يَسِيرُ - قَالَ قُتَيْبَةُ يُصَلِّي - فَسَلَّمْتُ عَلَيْهِ فَأَشَارَ إِلَىَّ فَلَمَّا فَرَغَ دَعَانِي فَقَالَ ‏ "‏ إِنَّكَ سَلَّمْتَ آنِفًا وَأَنَا أُصَلِّي ‏"‏ ‏.‏ وَهُوَ مُوَجِّهٌ حِينَئِذٍ قِبَلَ الْمَشْرِقِ ‏.‏
Reference : Sahih Muslim 540a
In-book reference : Book 5, Hadith 45
USC-MSA web (English) reference : Book 4, Hadith 1100
  (deprecated numbering scheme)