Have you ever noticed the endings of conversations - particularly telephone conversations? Typically you get to the point where one person decides the conversation should come to an end, and so they say something to advertise that they're getting ready to go. It could be something like, "You know, I have to run," if the people know each other well. If they know each other less well it might be something like "I'm sure you're very busy and I shouldn't keep you." Or maybe one of the people talking will pick up on a piece of topic that the other person had mentioned about something happening in their future: "Well, have fun at the picnic!" or "Good luck with that project, then."
Step two in the process is that the other person has to reply with a piece of talk that will acknowledge that the conversation is about to end. "Oh, sorry, I'll let you go," would be one option. For specific future events the person could say, "Thanks, I think I will/I'll do my best/I'll see you soon/I'll talk to you soon." If this turn does not acknowledge the conversation-ending move, however, the person's attempt to close the conversation will fall flat. The person who has to leave may feel ignored and sucked into a conversation when they'd rather be somewhere else. The less direct the ending move (especially with language learners), however, the more likely the conversation partner won't notice it. By contrast, if at this point the conversation partner simply says "Okay, bye!" their farewell will come across as needlessly abrupt.
Typically after the ending move has been acknowledged, you will find another turn by the person who initiated the conversation-ending moves. This will be something like "Take care!" or "Yeah, see you!" This move is basically without content and serves only to confirm the fact that this person has no further topics to propose and the conversation can end safely. The other person then responds to this with "You too" or something similar, indicating that indeed, he/she has no further content to propose either. This is the spot where if someone has forgotten to say something, it may be introduced.
Following these moves (social/phatic moves) that are simply redundant indicators that it's okay to end the conversation, that's when we get the actual goodbyes. A goodbye is a speech act that functions to end the conversation. The moves of the last turn ("take care") can sometimes be interpreted or used as goodbyes, but for myself, I never quite feel like I've really put a button on the conversation without an official "bye!" This is another possible complication. Proposing a new topic at this point is a bit more unexpected and sometimes people will actually apologize for it (where they are less likely to earlier).
Those of you familiar with Instant Message conversations may notice that you often have to do this goodbye sequence twice. The delay in IM chats introduces the (relatively likely) possibility that you will initiate this sequence of ending turns while someone else is still typing topic related stuff. In this circumstance, you end up with a point of conversational ambiguity. The person trying to initiate an ending sequence has the option of responding directly to the ongoing topic and then adding on a re-initiation of the ending sequence. Another option is for him/her not to respond to the existing topic material at all (but this might be considered abrupt). Sometimes the person who was typing topic information will simply drop the topic and reply with an acknowledgment of the initiating turn. Sometimes another odd option occurs and you end up conducting two entirely separate ending turn sequences, one which follows on to the first initiation of the ending sequence, and another which follows onto the remaining topic material that the second person had been typing!
By this time, this has happened to me so much that I'm starting to think there must be some kind of a story here. Or maybe not a story core element, but something I could add onto another context. I wonder if one could write a story with a split ending and have it be plausible. Hmmm...
Another point where this might be relevant to dialogue is that phatic talk, the empty stuff with which we maintain social relationships, may or may not be important to your story. If the smoothness of the relationship between the two people speaking is less important than the information conveyed, leaving the last few turns of talk out of the dialogue is certainly fine. However, if the relationship is important and you're going to play with some of the twists mentioned above to create tension, it might be to your advantage to pursue the conversation all the way through to the end.
Just sharing my thoughts, as usual!