It's rarely happened to me. The first time, I asked politely how she would feel if her doctor texted during an appointment or if she paid $200+ to a lawyer whose attention was elsewhere.
I now realize that the appointment is already hopeless if she starts texting or watching TV during it. Now, I would immediately leave if it was an incall or ask her to leave if it is in my hotel room and call the booker to explain why. This is one more reason not to pay until the encounter is over. If you let people take advantage of you, they don't like you more, they respect you less. It's not up to me to "captivate" them. I'll make an effort to motivate my toddler, not an adult who clears as much or more hourly than most professionals.
Once an SP insisted on having a long conversation with her BF on her cell. She even went for a walk in the corridor half-dressed so she could speak in private. As I was only renting the room for a few hours, I got dressed, locked it with some of her clothes still in it and left. Call me savage if you wish, but I had paid for the room and she had wasted my time, ruined my evening and was, as far as I was concerned, was attempting to steal $200 an hour from me.