As you have sore throat and a very chesty cough with frequent coughing-up of a lot of green phlegm not getting improved by itself, most probably it is bacterial.
If it is viral
, then it should resolve with the supportive measures (like honey, lemon, rest, pain and cough medicine) by 2 months.
In case of bacterial infection antibiotics will be required.
Cough syrup alone will not help.
For prescription, you have to go to doctor.
OTC medicine will not help.
When you are still having symptoms I feel that you should not wait any more.
you should consult doctor asap.
Please feel free for any follow up query.