Maybe there are mice IN the barn and that's why he flew in there? Other birds nesting in there?
Hawks prey on snakes, diurnal rodents like squirrels and chipmunks, and smaller birds. All you need to do is get his attention and attract him to the door, right? How about a fake snake? Coil it up at the entrance to look like it's basking in the sun?
Do you have a dog toy or stuffed animal that looks like a squirrel? Pet stores have them.