I think the foolproof way to know for sure is to ask. Find a lull in the conversation or, if you can tell they're getting ready to start one of these sessions, ask then. If this is a friend you go through this with a lot, perhaps you can even have a "deal" with them to let you know before the venting what they expect from the conversation.
My mom and I actually do this. If I need to vent and tell her about how I'm feeling, I let her know and she's just a shoulder to cry on or a body to scream frustrations at... and I do the same for her. If we actually want to talk through something (often after the venting is over), we'll go into "problem solving" mode and really work out why I feel the way I do or what solutions will work in the future to either prevent it or how to deal with it in the moment.
If you don't know up front, there are some solutions for you, still. Start out just listening to what they're saying. Receive the information, ask leading questions that are open and show that you're listening actively and paying attention but without questioning their choices. Let them share. Once they've told you everything, they may just say "thanks for listening" or they may say something like "what do you think I should do?" If they do the latter, they've just given you the chance to help, the "sign" if you will. In the case of the former, I'd follow it with something like "I'm always here to listen. Let me know if you want any help working through this/solving this problem."
I'd say that much of the time, friends want to solve their own problems - or they may have already dealt with it or know how they're going to deal with it - they just want someone who will be there to commiserate with them. But the important thing is, until they ask you for help or open up to help, you may just frustrate them by asking them to calm down or trying to help "solve" the problem. There's some interesting (if gross) advice about dealing with venting in an article by Psychiatrist Mark Goulston:
Today as a practicing business psychiatrist and CEO advisor, I've noticed that when you're faced with an upset customer, client, employee, shareholder, child, parent, spouse, or friend, it can actually feel like they're bulging with emotion and about to explode. Your instinctual and intuitive reaction may be to try to calm them down, urge them to cool off, suggest it's not worth getting so upset about. And sometimes that may work. But in cases where they're really upset, you may need to drain their emotional abscess just as you would have to do with a physical abscess. In those situations, asking them to calm down before they've vented will be about as useful as skipping straight to antibiotics before cleaning their wound.
And yet a lot of people don't know how to listen to someone venting. Usually, people take one of two attitudes. Option 1 is to jump in and give advice—but this is not the same as listening, and the person doing the venting may respond with "Just listen to me! Don't tell me what to do."
Option 2 (usually attempted after Option 1) is to swing to the other extreme, and sit there silently. But this doesn't actively help the person doing the venting to drain their negative emotions. Consequently, it's about as rewarding as venting to your dog.
He recommends three key questions for someone who is venting:
- What are you most frustrated about?
- What are you most angry about?
- What are you really worried about?
Granted, this guy is a business specialist so this may be a bit formalized for someone who's a friend but the basic framework should still work.