I had the same symptoms as yours.
I got bad lingering cough every time after recovering from serious upper respiratory infection. Five years ago, I had terrible cough for three months. I visited three doctors and tried antibiotics, cough suppressant, and x-rays but all of no help. Finally a specialist prescribed "asthma inhaler" and it knocked the cough off in two weeks.
I had terrible lingering cough again for a month after recovering from a flu last year. The same medicine helped me again.