I don't know if I've ever heard about a dog having a "hairball" before, but maybe he ate something he shouldn't have. It could be irratating him and causing him to heave without actually vomiting. I wouldn't leave anything in his kennel that he could chew into pieces, he could be chewing a toy or somthing in his kennel out of boredom and swallowing it. Hope that helps!
My dog does that sometimes too. It really could be a hairball you know. He's really hairy and when he grooms himself or licks himself, doesn't the fur falling out get caught up in his tongue and then it goes back into his mouth... But then again, mmy dog caught kennel cough before when he was a little puppy. It was wuite a serious one, then he got a flu too and a mild fever. He wasn't very strong then. But if the coughing is really bad, you should REALLY go to the vet...