That's a great question.
First you should know that normally, healthy individuals do not produce enough sputum to cough up. So that's a good thing. If you're producing enough phlegm to cough up, your in one way or another sick. So not produing sputum is a good thing.
I would say that the best way to obtain a sputum sample, and most common and humane, is by you spitting it up into a sterile cup. This is usually done in the lab, or doctor's office. Yet I'm sure you already knew this.
So the other methods.
One is to nasal-tracheally suction. This is where we stick as sterile catheter into your nose (or mouth, but usually nose) down into your lungs to suck sputum out.
However, by my own experience doing this, if you are awake, alert and orientated (AAOx3) and can't produce a sample on your own, this method probably won't work either. Healthy people do not produce sputum.
Likewise, it's a very invasive procedure, very uncomfortable, and in my opinion, inhumane to do on an AAOX3 patient.
A third method is to do a bronchoscopy. This might be nice to have done anyway if your asthma is really bad so your doctor can see what exactly is going on in your lungs. Plus you are put to sleep for the test.
Yet, in my opinion, I wouldn't let a doctor do this unless he had a reason other than to obtain a sputum sample.
I think the best way to obtain a sputum sample is for your doctor to give you a sterile cup and let you produce one on your own time. If you're not producing one, he'll just have to wait.
Keep in mind this answer was based on my own personal and professional opinion.