What should be done if one’s cell phone rings during salāh?
In the Name of Allah, the Most Gracious, the Most Merciful.
As-salāmu ‘alaykum wa-rahmatullāhi wa-barakātuh.
Ideally, one should always have a habit of switching one’s cell phone to silent mode upon entering the masjid. If one does not have such a routine, he should train himself until it becomes second nature for him.
In reality, if we go to the masjid at the time of athān, it will be very easy to be composed and cognisant of what one needs to do. Many a time, the brothers rush to the masjid at the last minute and thus are unmindful and negligent of everything including their cell phones.
There are many Apps available on smartphones which automatically switch the cell phone to silent mode at customised times. Those who have smartphones may resort to such Apps to make life easy for them.
Nevertheless, if one’s cell phone rang during salāh, one should switch it off or cancel the call with one hand. One’s salāh will not be invalidated by such an action. Despite the fact that this will result in some karahāh (dislike) in one’s salāh, one should act immediately when one’s cell phone rings to prevent disturbing others.
And Allah Ta’ālā Knows Best
Mufti Faraz Adam
 الْعَمَلُ الْكَثِيرُ يُفْسِدُ الصَّلَاةَ وَالْقَلِيلُ لَا. كَذَا فِي مُحِيطِ السَّرَخْسِيِّ (الهندية ج 1 ص 101 الرشيدية)
 يُكْرَهُ الْعَمَلُ الْقَلِيلُ الَّذِي لَا يُفْسِدُ كَالضَّرْبَةِ الْوَاحِدَةِ وَتَغْمِيضِ الْعَيْنَيْنِ وَرَفْعِهِمَا إلَى جِهَةِ السَّمَاءِ وَتَغْطِيَةِ الْفَمِ أَوْ الْأَنْفِ وَالتَّثَاؤُبِ إذَا أَمْكَنَهُ الْكَظْمُ ، فَإِنْ عَجَزَ فَفَتَحَ غَطَّى فَاهُ بِكُمِّهِ أَوْ يَدِهِ وَإِلَّا يُكْرَهُ . (شرح فتح القدير ج 2 ص 331)
This answer was collected from DarulFiqh.com, which is operated under the supervision of Mufti Faraz ibn Adam al-Mahmudi, the student of world renowned Mufti Ebrahim Desai (Hafizahullah).