Hadithcore
Hadith #2104920

Narrated Ibn 'Abbas (RA):

Allah's Messenger (ﷺ) said: "Whoever hears the call for prayer and and does not come (to the mosque for prayer), his prayer will not be accepted from him, unless he has a (legitimate) excuse." [Reported by Ibn Majah, ad-Daraqutni, Ibn Hibban and al-Hakim. Its chain of narration meets Muslim's conditions, but some Hadith scholars held that the stronger view is that it is Mawquf (saying of a Companion)].

وَعَنْ اِبْنِ عَبَّاسٍ رَضِيَ اَللَّهُ عَنْهُمَا, عَنْ اَلنَّبِيِّ ‏- صلى الله عليه وسلم ‏-قَالَ: { مَنْ سَمِعَ اَلنِّدَاءَ فَلَمْ يَأْتِ فَلَا صَلَاةَ لَهُ إِلَّا مِنْ عُذْرٍ } رَوَاهُ اِبْنُ مَاجَهْ, وَاَلدَّارَقُطْنِيُّ, وَابْنُ حِبَّانَ, وَالْحَاكِمُ, وَإِسْنَادُهُ عَلَى شَرْطِ مُسْلِمٍ, لَكِنْ رَجَّحَ بَعْضُهُمْ وَقْفَه ُ [1]‏ .‏

References2 variants
Sunnah.com reference
Book 2, Hadith 308
Arabic/English book reference
Book 2, Hadith 399