I'm sorry to hear of your discomfort.
Cough syrup is not, in my opinion, a solution for this. It can help control a cough in certain situations, when a cough can become really problematic, but it does nothing at all to deal with the problem that is causing the cough (which, from your description, is apparently unknown). So although the cough syrup might help with your symptoms, it isn't doing anything to help treat the cause.
Quite often a cough is caused by a virus. In this case, it generally will resolve on its own over time, even without any treatment. But there are many other potential causes - other types of infections (bacterial and fungal), inflammatory disorders, growths, etc. And if your cough has persisted for a month, then it is time, in my opinion, to continue investigations into what might be the cause.
So call your physician again, or seek a second opinion from a different practitioner.
I hope this helps. Please let me know if you have any additional questions - I'm more than happy to try and help.
Take care - Dr. Fay
__________________
If I have helped, then please click the ACCEPT button and leave positive feedback - Thank you, and take care

