The Messenger of Allah ﷺ said, "When the call to prayer is made, Satan turns and flees, passing wind so that he will not hear the call. Once the call is finished, he returns. When the iqamah is announced, he turns and flees again, and once the iqamah is finished, he returns and comes between a man and his own self, saying, 'Remember this, remember that,' bringing to mind things the man had not been thinking of, until the man no longer knows how much he has prayed."
حدثنا القعنبي عن مالك عن أبي الزناد عن الأعرج
أن رسول الله ﷺ قال إذا نودي بالصلاة أدبر الشيطان وله ضراط حتى لا يسمع التأذين فإذا قضي النداء أقبل حتى إذا ثوب بالصلاة أدبر حتى إذا قضي التثويب أقبل حتى يخطر بين المرء ونفسه ويقول اذكر كذا اذكر كذا لما لم يكن يذكر حتى يضل الرجل أن يدري كم صلى
Bukhari narrated it in the Book of adhan, chapter on the merit of calling the adhan, hadith no. 608, from the hadith of Malik through this chain, and it is in Muwatta (Yahya 1/69,70, and Qanabi p. 88). Muslim also narrated it, 38/389, in the Book of Prayer, chapter on the merit of adhan and the fleeing of Satan upon hearing it, from the hadith of Abu Zinad through this chain.