It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him): Once (in his presence), after the mu'adhdhin had given the adhan, a man went out of the mosque. Sayyiduna Abu Hurayrah (may Allah be pleased with him) said: "This man has disobeyed Sayyiduna Abu al-Qasim (peace and blessings be upon him)." Then he related that the Prophet (peace and blessings be upon him) had commanded us: when you are in the mosque and the adhan is given, no one should go out until he has prayed. (Allamah al-Haythami says:) I say: Imam Muslim and Imam Abu Dawud have recorded part of this narration.
Imam Ahmad recorded it, and its narrators are the narrators of the Sahih.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 1922