Bf close with ex

I don't know what to do about how close.my boyfriend is with his ex girlfriend. They were friends before they were together so I understand it's reasonable they want to be friends after breaking up, but since him and I have been together she's treated him nastily and been unreliable, yet whenever she decides to come back into his life he just let's it happen. He tells me they're just friends but they have regular phone calls and text.often and it makes me feel extremely uncomfortable. I've spoken to him about it and he told me it sounds like I'm giving him an ultimatum, either her or me. I obviously don't want to ruin a friendship but I want him to see this is affecting me negatively and I want to be the most important girl (besides his mother) in his life, help!