In the peaceful conditions of Medina Muslims had religious freedom. They had to figure out how to summon the Muslims to the Mosque.
The jews summoned their congregations to the temple by blowing trumpets, the Christians by striking gongs. Mahummad(peace be upon him) felt that human voice could better communicate the emotion and inspiration which should be dedicated to the solemnity of the occasion.
When this problem was discussed, one day Abd Allah b. Zayd came to Holy Prophet and related to him a dream in which some one had taught him the way of calling people to prayer. It was:
Allahu Akbar! Allahu Akbar! Allahu Akbar! Allahu Akbar!
Ash hadu Al-la-Ilaha il Lallah
Ash hadu Al-la-Ilaha il Lallah
Ash hadu anna Muhammadar Rasulullah
Ash hadu anna Muhammadar Rasulullah
Hayya ‘alas-salah
Hayya ‘alas-salah
Hayya ‘alal-falah
Hayya ‘alal-falah
Allahu-Akbar Allahu-Akbar La-ilaha il-Lallah.
i.e.
(Allah is Most Great! Allah is Most Great! Allah is Most Great! Allah is Most Great!
I bear witness there is none worthy of worship except Allah.
I bear witness there is none worthy of worship except Allah.
I bear witness that Muhammad is the Prophet of Allah.
I bear witness that Muhammad is the Prophet of Allah.
Come to prayer.
Come to prayer.
Come to success.
Come to success.
Allah is Most Great! Allah is Most Great! There is none worshipable but Allah.)
The Holy Prophet Said “Your vision, by grace of God, is true. Go to Bilal and communicate it to him so that he should call to prayer accordingly.” And ordered that before every prayer a man should repeat these words with a loud voice standing on a high place so that Muslims should know that the hour for prayer had come.