It is narrated from Sayyiduna Abdullah (may Allah be pleased with him) that he said: "We were with the Messenger of Allah (peace and blessings be upon him) during a journey when he (peace and blessings be upon him) heard a caller calling out: 'Allahu akbar, Allahu akbar' (Allah is the Greatest, Allah is the Greatest). The Messenger of Allah (peace and blessings be upon him) said: '(This man) is upon the fitrah (natural disposition).' Then he called out: 'Ashhadu an la ilaha illallah' (I bear witness that there is no god worthy of worship except Allah), and the Messenger of Allah (peace and blessings be upon him) said: 'He has come out of the Fire.' Then, when we reached that man, we saw that he was the owner of a flock (a herdsman) whom the time of prayer had overtaken, so he had called the adhan for the prayer."
Imam Abu Ya'la al-Mawsili (may Allah have mercy on him) also narrated it in the same way in his chain through Muhammad bin Bishr al-Abdi (may Allah have mercy on him).
Also, Muhammad bin Bishr and al-Abbas bin al-Fadl narrated it through Sa'id bin Abi Arubah (may Allah have mercy on him) from Qatadah (may Allah have mercy on him), and mentioned the complete text.