I was gonna say what GalaGirl already said so brilliantly.
However, I know that it is difficult to do what seems like choosing between a beloved parent or sibling and a boyfriend. We DO teach people how to treat us. I don't think that you need a final ultimatum. I think you could do it with, 'I really love them both and I'm not going to listen to you denigrate my relationships or my men. When you do I will end the communication.'
and then you have to do that.
So, you don't have to say, I'm not coming back til you apologize (if you're not ready to do so).
But in every phone call, when there's a comment, you hang up. You don't even need to say why. They might call back, and you can choose, or not, to answer and explain, 'as I said before, I won't listen to you do that.'
If you are with them and they do that, you must leave.
It's a lot like a time-out for children (they are behaving like children).
I've found this to be very effective with my own parents.
I'm lucky though, I trained them well, long before I had two boyfriends. And they knew and liked both my boyfriends when I was mono with each of them, before they were both my boyfriends at the same time.