It is narrated from Ibrahim al-Nakha'i (may Allah have mercy on him) that "he disliked that a man should go out of the mosque when he has already heard the iqamah of the prayer."
I say that Imam al-Tirmidhi (may Allah have mercy on him) said that in this chapter there is also a narration from Sayyiduna Uthman (may Allah be pleased with him). He also said that the practice of the people of knowledge among the Companions of the Messenger of Allah (peace and blessings be upon him) and those who came after them is upon this: that no one should leave the mosque after the adhan except with an excuse, for example that he is without ablution, or that there is some unavoidable matter that must be attended to. He also said that it is narrated from Ibrahim al-Nakha'i (may Allah have mercy on him) that he said: "(One may leave) as long as the muezzin has not begun the iqamah." Imam al-Tirmidhi (may Allah have mercy on him) said: In our view this is for the one who has some excuse for leaving the mosque.
Hafiz Abu Bakr bin al-Mundhir (may Allah have mercy on him) said: It has reached us from several Companions of the Messenger of Allah (peace and blessings be upon him) that they said: "Whoever hears the adhan and then does not respond to it without an excuse (that is, does not join the congregation), there is no prayer for him." Among these Companions are Sayyiduna Ibn Mas'ud and Sayyiduna Abu Musa al-Ash'ari (may Allah be pleased with them both), and this is also narrated from the Prophet (peace and blessings be upon him). He further said that among those who held attendance at congregational prayer to be obligatory (fard) are Ata, Imam Ahmad bin Hanbal and Abu Thawr (may Allah have mercy on them), while Imam al-Shafi'i (may Allah have mercy on him) said: "I do not grant anyone who is able to pray in congregation a concession to abandon it, except for a legitimate excuse."