One of my mates had exactly this problem. He is blessed with the ability to not really care what other people think of him (perhaps I should mention him in the "what are you like" thread). I was with him in his garden when the neighbours dog started barking at me, he waited till the neighbour came out then climbed up on the fence and bellowed at the top of his lungs "will you shut the feck up" then looked at the startled neighbour and nodded saying " bloody dogs eh?" As if he was somehow helping the neighbour out.
Not sure what the long term outcome was but the dog never barked again that night.