The rep was trying to guilt you into listening their spiel, possibly because that's what they are expected to do by their employer, or possibly because emotions during a long day got the better of them. There was nothing you could do to prevent that, other than listening to their spiel.
Personally, my rule is to treat phone reps with common decency, but also treat both their and my time as valuable, meaning I act exactly the same way you did. After their escalation, since the problem was resolved, you had at least 2 good options:
- Stop listening, say goodbye, then hang up.
- Interrupt them to ask for their name, write it down, say goodbye, then hang up.
Do not argue about who was being rude. If you want to let them know they've been inappropriate, asking them for their name directly after their inappropriate behavior is sufficient, and avoids the argument.