Sayyiduna Jabir bin Abdullah (may Allah be pleased with both of them) reports: A man came to the mosque on Friday while the Noble Prophet (peace and blessings be upon him) was delivering the sermon. The Prophet (peace and blessings be upon him) asked him: “Have you performed the (Tahiyyat al-Masjid) prayer?” He replied: No. The Prophet (peace and blessings be upon him) said: “(Stand up and) perform two rak‘ahs.” Imam Darimi (may Allah have mercy on him) said: I also say the same.
Hadith Referenceسنن دارمي / من كتاب الصللاة / 1594
Hadith Takhrijاس روایت کی سند صحیح ہے اور حدیث متفق علیہ ہے۔ دیکھئے: [بخاري 930] ، [مسلم 875] ۔ نیز دیکھئے حديث رقم (1597)
Brief Explanation
(Commentary on Hadiths 1592 to 1594)
From this hadith, it is established that performing Tahiyyat al-Masjid (the greeting prayer of the mosque) during the sermon (khutbah) is permissible, the details of which have already been discussed under hadith number (1592). The second issue established here is that if there is a need, the preacher (khatib) may speak to someone while delivering the sermon, and the person addressed may also respond, as is evident from the questioning of the Messenger of Allah (sallallahu alayhi wa sallam) and the response of the one addressed.
Furthermore, performing the prayer or responding (to the khatib) does not invalidate the reward of Jumu‘ah, and the prohibition of speaking during the sermon refers to the listeners conversing among themselves.