Layer bottom of hamburger buns with salami, cheese, onion (if using). Spread barbecue sauce on top half of bun, and cover rest of sandwich. Wrap each sandwich in aluminum foil and bake in preheated 400 degree oven until cheese melts; about 5-10 minutes.