Answer: when is in the clause with the single action, “while” in a clause with a continuous action,
Explanation: Here, the conjunction “when” is in the clause with the single action, “the phone rang.” So as a general rule, you should use “while” in a clause with a continuous action, using a verb in a continuous tense. Use “when” in a clause with a single action, using a simple past or present