thanks for query.
As you are in second trimester of pregnancy
,you can take antibiotic those are safe in pregnancy.
Go to gynae and take appropiate antibiotic which is safe in pregnancy.
Get sputum test done.
Steam inhalation is effective.
Take some rest.
take plenty of water orally.