Yahya related to me from Malik that Yahya ibn Said said, "The Messenger of Allah ﷺ had wanted to take two pieces of wood to strike them together to gather people for the prayer, and Abdullah ibn Zayd al-Ansari, then of the tribe of Harith ibn al-Khazraj, was shown two pieces of wood in his sleep. He said, 'These are close to what the Messenger of Allah ﷺ wants.' Then it was said, 'Do you not call to the prayer?', so when he woke up he went to the Messenger of Allah ﷺ and mentioned the dream to him. The Messenger of Allah ﷺ ordered the adhan."
أَنَّهُ قَالَ كَانَ رَسُولُ اللَّهِ ﷺ قَدْ أَرَادَ أَنْ يَتَّخِذَ خَشَبَتَيْنِ يُضْرَبُ بِهِمَا لِيَجْتَمِعَ النَّاسُ لِلصَّلاَةِ فَأُرِيَ عَبْدُ اللَّهِ بْنُ زَيْدٍ الأَنْصَارِيُّ ثُمَّ مِنْ بَنِي الْحَارِثِ بْنِ الْخَزْرَجِ خَشَبَتَيْنِ فِي النَّوْمِ فَقَالَ إِنَّ هَاتَيْنِ لَنَحْوٌ مِمَّا يُرِيدُ رَسُولُ اللَّهِ ﷺ فَقِيلَ أَلاَ تُؤَذِّنُونَ لِلصَّلاَةِ فَأَتَى رَسُولَ اللَّهِ ﷺ حِينَ اسْتَيْقَظَ فَذَكَرَ لَهُ ذَلِكَ فَأَمَرَ رَسُولُ اللَّهِ ﷺ بِالأَذَانِ