Assalamualaikum ustaz. I was in a lavatory when I heard the call of the adhan. Do I have to answer it?
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions and all those who follow his footsteps until the Last Day.
Adhan is a specific dhikr sanctioned as a way to inform the beginning of the time for the obligatory prayers and call upon Muslims to perform the prayer together. The ruling for adhan for obligatory and qadha’ prayers is sunnah muakkad, which is a sunnah kifayah for congregational prayer and sunnah ‘ainiah for a prayer performed alone. The adhan plays an important role in showcasing the eminence of Islam. 
Basically, the ruling of answering the adhan is sunnah muakkadah (encouraged sunnah). When the adhan is called out, we as the Muslim ummah are encouraged to leave any activity and at the same time answer the adhan as a sign of respect. From Abdullah bin ‘Amr RA, the Prophet PBUH said:
إِذَا سَمِعْتُمُ الْمُؤَذِّنَ ، فَقُولُوا مِثْلَ مَا يَقُولُ ثُمَّ صَلُّوا عَلَيَّ ، فَإِنَّهُ مَنْ صَلَّى عَلَيَّ صَلاَةً صَلَّى اللَّهُ عَلَيْهِ بِهَا عَشْرًا ، ثُمَّ سَلُوا اللَّهَ لِيَ الْوَسِيلَةَ ، فَإِنَّهَا مَنْزِلَةٌ فِي الْجَنَّةِ ، لاَ تَنْبَغِي إِلاَّ لِعَبْدٍ مِنْ عِبَادِ اللهِ ، وَأَرْجُو أَنْ أَكُونَ أَنَا هُوَ ، فَمَنْ سَأَلَ لِي الْوَسِيلَةَ حَلَّتْ لَهُ الشَّفَاعَةُ
“When you hear the mu’adhdhin repeat what he says, then invoke a blessing on me, for everyone who invokes one blessing on me will receive ten blessings from God. Then ask God to give me the wasila, which is a rank in paradise fitting for only one of God’s servants, and I hope that I may be the one. If anyone asks that I be given the wasila, he will be assured of my intercession.” 
Among the sunnah for people who hear the adhan are:
- Be silent and listen to the adhan whether he is in a pure, hadas, junub or menstruating state regardless of whether he is a child or an adult. Then, answer with the same as what the muezzin said except for the phrase (حي على الصلاة) and (حي على الفلاح).
- Praise and salutations to the Prophet PBUH in a low voice, then ask Allah for wasilah and supplicate to Him after the adhan without delaying it for a long time.
- Supplicate for oneself, for it is an honoured and blessed time and the time when supplications are granted. It is sunnah to supplication between the adhan and iqamah. 
Regarding the above issue, we present the discussion on the hadith of the Prophet PBUH not answering the salam when he was urinating. The hadith is narrated by Imam Muslim, from Ibnu Umar RA:
أَنَّ رَجُلاً مَرَّ وَرَسُولُ اللَّهِ صلى الله عليه وسلم يَبُولُ فَسَلَّمَ فَلَمْ يَرُدَّ عَلَيْهِ
“A man passed by the Prophet while he was urinating, and greeted him by the Salam. The Messenger of Allah and he didn’t respond.” 
Imam al-Nawawi when commenting on this hadith said: It is makruh to speak or recite dhikr when urinating regardless of whether it is in a building or in the desert. This includes speaking of other matters except in exigent situations. Furthermore, if one sneezes, he doesn’t have to say Alhamdulillah when he is in the restroom. It is also unnecessary to answer the salam and adhan. 
This is to protect the purity of Allah SWT’s name just like when the Prophet PBUH took off his ring that was inscribed with Allah SWT’s name before he went to the lavatory. From Anas bin Malik RA:
كَانَ رَسُولُ اَللَّهِ - صلى الله عليه وسلم -إِذَا دَخَلَ اَلْخَلَاءَ وَضَعَ خَاتَمَهُ
“Allah’s Messenger (ﷺ) used to remove his ring when entering the lavatory.” 
Furthermore, it is permissible to qadha the answering of the adhan after one is done or after intercourse with one’s wife as stated in Imam al-Nawawi in his book: “And the exemption for this (answering the adhan) is for those who are praying, in the lavatory and during intercourse. When it is done, he can follow it (answer the adhan).” 
Likewise, it is permissible to answer the adhan in one’s heart as stated by Imam al-Nawawi: “If one sneezes then recite Alhamdulillah in his heart and even without moving his tongue, it is permissible. The same for during intercourse.” 
Thus, regarding the above question, we state that the ruling for answering the adhan is sunnah for every mukallaf who hears it. Although if he is in the lavatory, scholars restrict it and it is makruh. This is to protect the eminence or honour of the name of Allah SWT and it is one of the manners of entering the lavatory. We can qadha it after we are done or answer it in our hearts.