The Messenger of Allah ﷺ said, "Whoever says when he hears the caller to prayer, 'I bear witness that there is no god but Allah alone, with no partner, and that Muhammad is His servant and His Messenger. I am content with Allah as Lord, with Muhammad as Messenger, and with Islam as religion,' his sins will be forgiven."In another narration, "Whoever says when he hears the caller to prayer, 'And I too bear witness...'"
عن رسول الله ﷺ أنه قال: من قال حين يسمع المؤذن: أشهد أن لا إله إلا الله وحده لا شريك له، وأن محمدا عبده ورسوله، رضيت بالله ربا، وبمحمد رسولا، وبالإسلام دينا غفر له ذنبه… وفي رواية: من قال حين يسمع المؤذن: وأنا أشهد…
Muslim narrated it in the Book of Prayer (386) through Layth, from Hakeem bin Abdullah, from Amir bin Saad bin Abu Waqqas, from Saad bin Abu Waqqas, and he mentioned it.As for what is narrated from Umm Salama, who said, "The Messenger of Allah ﷺ taught me to say at the Maghrib adhan, 'O Allah, this is the approach of Your night and the departure of Your day, and the voices of those who call upon You, so forgive me,'" its chain of transmission is daif. It was narrated by Abu Dawud (530), Tirmidhi (3589), and Ibn Sunni in Amal al-Yawm wal-Layla (650), and Hakim (1/199), all of them through various chains from Abu Kathir, the freedman of Umm Salama, from Umm Salama, and he mentioned it.Abu Kathir, the freedman of Umm Salama, is unknown. Tirmidhi said, "This is a gharib hadith, we do not know it except from this route." As for Hakim, he said, "This is a sahih hadith," following his own method of grading the hadiths of unknown narrators as sahih.