It is narrated from Sayyiduna Jabir (may Allah be pleased with him) that Sayyiduna Ibn Umm Maktum (may Allah be pleased with him) came to the Messenger of Allah (peace and blessings be upon him) and said: "O Messenger of Allah! I am deprived of sight, and my house is also far away (from the mosque)." So he spoke to him (peace and blessings be upon him) about the prayer, so that he (peace and blessings be upon him) would grant him permission to pray at home. At this he (peace and blessings be upon him) asked: "Do you hear the call to prayer (adhan)?" He said: Yes. So he (peace and blessings be upon him) said: "Then come to the prayer, even if you have to come crawling on your knees." In a narration through another chain, these words are at the end, that he (peace and blessings be upon him) said: "Answer the call (that is, come to the mosque), even if you have to come crawling on your knees or dragging yourself on your backside." This hadith was narrated by Imam Ahmad bin Hanbal, by al-Tabarani in al-Awsat and by Ibn Hibban in his Sahih; it has a shahid (supporting narration) in Sahih Muslim and elsewhere from the hadith of Sayyiduna Abu Hurayrah (may Allah be pleased with him), and Ahmad, Abu Dawud and Ibn Majah narrated it from the hadith of Sayyiduna Amr bin Umm Maktum (may Allah be pleased with him), and al-Tabarani from the narration of Sayyiduna Abu Umamah (may Allah be pleased with him). After mentioning this hadith, Imam al-Khattabi says: "In this is evidence that attending the congregation is obligatory (wajib), for if it were merely recommended, then the excused, the weak, and people in a condition like that of Sayyiduna Ibn Umm Maktum (may Allah be pleased with him) would have been the most deserving of permission to stay behind." Imam Ata bin Abi Rabah used to say: "There is no permission for anyone of Allah's creation, whether he is in a town or in a village, to abandon the congregational prayer after hearing the adhan." Imam al-Awza'i said: "Parents are not to be obeyed in the matter of abandoning the Friday prayer and the congregations." The word "shasi'" mentioned in the text (with the letters shin, sin and 'ayn) means one whose house is far away.
Hadith Referenceإتحاف الخيرة المهرة بزوائد المسانيد العشرة / كتاب المساجد / 1031
Hadith Gradingمحدثین:أخرجه ابن حبان في صحيحه
Hadith Takhrij«(1031/1) أخرجه مسند أحمد برقم: 14531، وأخرجه المعجم الأوسط للطبراني برقم: 3738، وأخرجه مجمع الزوائد ومنبع الفوائد برقم: 2164» «(1031/2) أخرجه مسند أحمد برقم: 14531، وأخرجه فتح الباري برقم: 618، وأخرجه المعجم الأوسط للطبراني برقم: 3738، وأخرجه مجمع الزوائد ومنبع الفوائد برقم: 2164»
It is narrated from Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) that a group of three people asked him about praying voluntary prayers in the mosque, and he said: "You have asked me about the very thing I asked the Messenger of Allah (peace and blessings be upon him) about. He (peace and blessings be upon him) said: 'The obligatory prayer is in the mosque (or the mosques), and the voluntary prayer is at home.'" This hadith was narrated by Imam Ahmad bin Hanbal, by al-Tabarani in al-Awsat and by Ibn Hibban in his Sahih.
Hadith Referenceإتحاف الخيرة المهرة بزوائد المسانيد العشرة / كتاب المساجد / 1032