Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
nasai-kubra:10111Muḥammad b. Manṣūr > Sufyān > Mujammiʿ > Abū Umāmah b. Sahl > Muʿāwiyah

[Machine] It is narrated that when the Prophet ﷺ would hear the caller to prayer say "I bear witness that there is no god but Allah," he would say "And I bear witness." Then when he would hear the caller say "I bear witness that Muhammad is the Messenger of Allah," he would say "And I bear witness." Then he would remain silent.  

الكبرى للنسائي:١٠١١١أَخْبَرَنَا مُحَمَّدُ بْنُ مَنْصُورٍ قَالَ حَدَّثَنَا سُفْيَانُ عَنْ مُجَمِّعٍ عَنْ أَبِي أُمَامَةَ بْنِ سَهْلٍ عَنْ مُعَاوِيَةَ

أَنَّ النَّبِيَّ ﷺ كَانَ إِذَا سَمِعَ الْمُنَادِيَ يَقُولُ أَشْهَدُ أَنْ لَا إِلَهَ إِلَّا اللهُ قَالَ «وَأَنَا» فَإِذَا سَمِعَهُ يَقُولُ أَشْهَدُ أَنَّ مُحَمَّدًا رَسُولُ اللهِ قَالَ «وَأَنَا» ثُمَّ سَكَتَ