You can use the pattern "AあいだにB" when the event B takes place in the middle of another event A. Most often, the containing event A is described with the continuous ている. The verb A is in the present tense, even when the clause A describes a situation in the past.
There was a phone call while I was taking a bath.
A (ている) あいだに B = B takes place, while A.