5. Book of Rites
٥۔ كِتَابُ الْمَنَاسِكِ
[Machine] The Messenger of Allah, peace be upon him, said: "Circumambulating the Kaaba is a prayer, except that Allah has allowed speaking during it. So, whoever speaks during it should only speak good."
قَالَ رَسُولُ اللَّهِ ﷺ «الطَّوَافُ بِالْبَيْتِ صَلَاةٌ إِلَّا أَنَّ اللَّهَ أَبَاحَ فِيهِ الْمَنْطِقَ فَمَنْ نَطَقَ فِيهِ فَلَا يَنْطِقْ إِلَّا بِخَيْرٍ»
This tradition has also been narrated on the authority of ‘A’ishah through a different chain. (Using translation from Abū Dāʾūd 99)
عَنِ النَّبِيِّ ﷺ نَحْوَهُ