A few years ago, an article in the Smithsonian magazine concluded that dogs may bark for no reason. It's just something that they do – a function without a purpose, so to speak.
That view is not widely shared. Even studies of wild canine behavior attest to the fact that barking serves a function of long-range communication. It is at least as important to dogs as a marine foghorn warning is to mariners. Even the most elementary interpretation of barking is that it is a non-visual communication signaling the dog's presence and territorial concerns.
On hearing a bark, the receiver of this audible message knows:
The presence of another dog out there
His approximate direction
His approximate distance
The sender's level of the excitement/energy/commitment
The sender of the message knows exactly what he is transmitting but may not know to whom.
If the recipient responds by barking back, he confirms:
The receipt of the message
His presence of another dog out there
His location and energy level (by how hard and fast he barks)
All of the above is really "old hat" and well accepted. What becomes more controversial, however, is whether the bark is more than just a "here I am" type noise that signals a dog's location and territorial claim.
Most dog owners believe that they can recognize their dog's different types of barking. The dog may, for example, emit an excited, alerting bark when a friend approaches the home but may sound more aggressive and foreboding when a stranger or a would-be intruder draws close. In addition to the different tones of barking, the same tone of bark can be used in different situations to "mean" different things.
If your dog's ball has rolled under the couch and he wants someone to get it out, he may bark for assistance. A learned communication, like verbal language in people, a bark is used in this context because it works to produce the desired response from you. Once he gains your attention, you recognize immediately what the dog wants by: the barking itself, the dog's orientation, and the situation. Humans also use a variety of signals to communicate with each other; they speak, orientate, gesticulate, and use facial expressions and other body language.
But could you understand what your dog wants by listening to it bark on the telephone? Probably not. But you might be able to determine the tone of the bark (friendly or hostile), the volume and intensity of the bark (his state of arousal) and the duration of barking – continuous or intermittent (indicating how intent the dog is).
Obviously, barking is not as sophisticated a method of vocal communication as human language but it works to convey elementary messages. Humans probably grunted their wishes to each other and barked orders a few hundred generations ago. It was a start. Interestingly, human consonant sounds are thought to be "hard-wired" from these humble beginnings just as the dogs bark is "hard-wired." Human language (in any country) comprises different constellations of consonants strung together in creative ways. Dogs have a long way to go to catch up but some do seem to try very hard with what little hard-wired sound-producing ability they possess by using different intensities, tones, and groupings of barks, growls, and mutters, interspersed with the occasional howl to get their message across.
Their sophisticated body language compensates to some extent for this limited vocal response. With patience, dogs can "train" their human counterparts to understand what they're trying to say.