I personally allow my dogs "fun time"--time when they are released.
*****CAUTION: Understand that my dogs are off-leash trained. I would never, ever, EVER release a dog without a flawless recall not knowing the safety or danger of the area. I live in the country where this is possible--I do not have to worry about cars, etc.*****
So let me explain...from my house to the field where we walk, they are expected to stay at my side. I begin my walk with a command to get them in the position I want them in(sitting at my side, right beside me). If they get a little ahead, I have a command to get them to slow down and return to the desired position. We'll walk this way for a little while, then I'll say, "Okay, GO!" really enthusiastically, and they know that means they are free to go wherever they wish(within reason). They've kind of learned that I don't want them more than a certain distance away, and when they get to that distance they'll usually stop and wait. When I want them to come back, I simply say come, then give the command to get back to my side. We'll walk a while this way again, then release, and so on. So they randomly get freedom--they never know when it's coming, but when it does they love it. But they love coming back too, because doing so earns them the release. If they try to venture ahead when they are supposed to be staying next to me, then the leashes are attached and then we work on walking right(which isn't a punishment, just extra training). So they've learned that if they walk where I want them to, they get free time sooner than if they didn't walk right and we had to work on it.
When I was working on this, I used a 25ft leash and a 50 ft leash so that there was no possibility of them getting loose and finding trouble.
So how can you incorporate this? As Jackie suggested, you can treat him every time he is walking just where you want him. Also, never pull on him. If he's sniffing and you don't want him to be sniffing, or looking back at someone who he wanted to befriend, don't pull--at all. Be really enthusiastic--smooch, say his name in a high-pitched voice, clap, squeak a toy, whatever you can do to become more interesting than whatever has his attention. Do not use the word come if he is not going to come. You will only teach him to ignore this command--which you certainly do not want to do. If you have been teaching him to come to his name rather than "come" or "here," then don't use his name. Just whistle, smooch, etc.
You can also teach him a release word by tossing a treat away from you and saying, "Okay!" or "Go!" or whatever you want to use. Or, you can stash really stinky treats in your yard, alley, or even around the house. Try to get him to walk normally--do your best to not let him have the treats while he is expected to walk nice. If he's doing good or even just sitting at your side, then use your release word excitedly and let him grab his snack. If he doesn't have a good nose, help him find it.
Also, even on leash, never use the release word if you aren't sure it's a safe area. Mud has a wonderful recall and I have never had an issue with her walking off leash, but nonetheless I would never release her unleashed in a public park. There are too many possibilites and unknowns. Just not a good idea.
Hope this helps.