Headphones are a good idea. Also thinking of ways to stop her once she gets going. Do you and your co-worker share a room, or are you able to see when she starts on the other? If so, maybe a mutual agreement to "remind" the other of a call which needs to be returnned, or to ask the other for assistance with something, so as to break up the conversation.
I also think if Boss is chtting then a polite - "It's great to talk to you, but I'm going to have to get back to [job related task] speak to you later" is fine - if said task is something which allows you to get up, move physically away or to turn away from her then that re-inforces your verbal cur to end the conversation.