He was with the Messenger of Allah ﷺ on a journey when he heard the voice of a man giving the call to prayer. The Prophet ﷺ repeated the words after him, then said, "This man must be a shepherd or someone away from his family." They went to check, and indeed he turned out to be a shepherd.
أخبرنا إسحق بن منصور قال أنبأنا عبد الرحمن عن شعبة عن الحكم عن ابن أبي ليلى
أنه كان مع رسول الله ﷺ في سفر فسمع صوت رجل يؤذن فقال مثل قوله ثم قال إن هذا لراعي غنم أو عازب عن أهله فنظروا فإذا هو راعي غنم
No references are available.
[hasan] Ahmad narrated it, 4/336, from the hadith of Shubah with this same chain. It is also found in Kubra, hadith no. 1629, and the hadith has many corroborating witnesses.