You can unmute the iPhone while the mute switch is on by two methods. The first is through AssistiveTouch, and the other is the Back Tap option.