In the case of the firend on the phone, I would say "I have to go now because I'm going to be late for an appointment (or whatever you're late for) but I'll ring you as soon as I get home" and I would schedule in time to sit and have a lengthy conversation with no interruptions.

I'm not the type of person to demand people to be quiet in the movies or bash on the neighbour's door to demand they turn their music down. I think you can still be assertive and get what you want in the nicest possible way.