Your “come” command should always mean something wonderful is about to happen. If your dog has already decided that coming is optional, why not change the word you use? The word “here” is a very good one, and most of us cannot say this word without a cheerful tone to our voice.
Always call your dog in an upbeat tone of voice, even when you are panicked because he is darting away into a dangerous road. If you yell like you’re furious, he may be afraid to come to you. If you keep your tone high and upbeat, he is more likely to choose coming over running away.
Manage the circumstances. If your dog is in a position where he is very unlikely to come when called, such as off-leash playing with the next door neighbor’s dog, do not even call him. He doesn’t need more practice ignoring the recall command. In this case, simply go to your dog, take his collar and snap his leash to it. Many dogs, such as Beagles, can become so intent on sniffing something that they will not even hear you if called in their own backyard. If you can tell your dog is on an “intense sniff,” simply walk over to him as opposed to calling him to you. Until your dog has proven that he can respond to your command reliably, he should not be expected to come off-leash.