Whenever Ali bin Abu Talib heard the muezzin giving the call to prayer, he would repeat what he said. When the muezzin said, "I bear witness that there is no god but Allah, and I bear witness that Muhammad is the Messenger of Allah," Ali
would say, "I bear witness that there is no god but Allah, and I bear witness that Muhammad is the Messenger of Allah, and those who deny Muhammad are the liars."
حدثنا عبد الله حدثني محمد بن المنهال أخو حجاج بن منهال حدثنا عبد الواحد بن زياد عن عبد الرحمن بن إسحاق حدثني أبو سعيد
كان علي بن أبي طالب رضي الله عنه إذا سمع المؤذن يؤذن قال كما يقول فإذا قال أشهد أن لا إله إلا الله وأشهد أن محمدا رسول الله قال علي رضي الله عنه أشهد أن لا إله إلا الله وأشهد أن محمدا رسول الله وأن الذين جحدوا محمدا هم الكاذبون
Its chain of transmission is daif. Muhammad bin Minhal Attar Basri Anmati is trustworthy, Abu Hatim and Ibn Qani and others confirmed his trustworthiness, and Abdullah bin Ahmad said, in what will come at 4800, that he was trustworthy. Abdul-Rahman bin Ishaq is Wasiti, and he is daif as mentioned before at 875. Abu Saeed is not known.Haythami said in Zawaid 1:332, regarding this hadith, Abdullah related it among his additions. It contains Abu Saeed narrating from Ibn Abu Layla, and I did not find anyone who mentioned him.