You can try an "inception" type idea to make it seem like it was his idea if you're too shy. After you have a good conversation and one of you has to go, simply say "I'd love to continue this conversation at another time, how can we go about doing that?" This should be a big hint for him to say, "What's your number?" Just be forewarned, if he doesn't say that, you'll have to be assertive and tell him to take your number.
Always tell people exactly how you feel, at that exact moment. If the moment has passed, let us help you:
www.HopeYouGetThis.Com
L’esprit de l’escalier