looks like the pain could be due to trauma or due to a infection in the tooth gums etc.
it could also be referred pain
in order to identify the actual problem a thorough examination has to be done with relevant investigations like x ray
continue on the prescribed medicines and if the symptoms worsen consult a physician regarding the same.
i hope i have answered your query,