It is Wajib (obligatory) on Muslim

Q 4: What is the ruling on performing Salah (Prayer) at places of banquets and festivals but not at the nearby Masjid (mosque)? It may be worth mentioning that such occasions are mostly held at night and thus young men start to underestimate the importance of performing Salah at the Masjid as they see their fathers abandoning the Masjid and performing Salah at the places mentioned above.

(Part No. 8; Page No. 60) A: It is impermissible for the concerned people to perform Salah at the places of banquets and festivals. Rather, they have to perform the Salah at the Masjid with their other brothers. Proof for the foregoing is that the Prophet (peace be upon him) said: Whoever hears the Nida' 'i.e. Adhan; call to Prayer' and he does not come to it (the Masjid), then there is no prayer 'counted' for him except if he has a `Udhr 'valid excuse'. When Ibn `Abbas was asked about `Udhr he said: "It is fear or illness." Moreover, it is authentically reported that: A blind man came to the Prophet 'peace be upon him' and said: 'O Messenger of Allah! I have no one to guide me to the Masjid so is there any Rukhsah 'concession' for me to perform Salah at my house?' He 'the Prophet, peace be upon him' said: 'Do you hear the Nida' (Adhan) the man said: 'Yes.' He 'the Prophet then' said: 'Respond to it.' May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.