For us, it's all about the routine. The routine is so well established now, that they just have to hear a certain call and intonation in our voice, and they come running from wherever they are on the property.
Our routine is as follows: We let them out in the morning to free range for about an hour (supervised) and then we make their "soup," which consists of peas and fresh greens in water with a mealworm crumble on top. When it's time for them to come back to their fenced pastures for the day, we just yell: "Hey Ducklings! If you're ready, it's time for Soup for Ducks." It's very important you say "Soup for Ducks" and not "Duck Soup." The latter could be quite traumatizing.
If we are not working outside (in which case they are out working with us), they spend their day in one of two fenced pastures around their run. In the evening, they come out for another hour or so of supervised foraging time. Then it's the same soup routine and call, and they all come running back to have their soup outside the run. While they are having soup, we close all gates, and usually they are inside the run before we finish. We lock the run and go around back for the "Flock Party," and everyone usually comes running up the ramp (relatively long ramp) for some mealworm treats. We generally let them have 24/7 access to the run (covered and predator proof) unless it is very, very cold, but if we do need to lock them in, we just lower the door while they are having their mealworms.
You'll hear the call around 0:08 here: