Thanks for the query.
Foul smelling urine along with pelvic pain
could indicate a Urinary tract infection
You should do urine analysis and urine culture and an ultrasound
of the kidneys and bladder.
See a physician with these test results and he/she can prescribe you appropriate antibiotics if there is evidence of infection.
Meanwhile drink plenty of fluids.
Hope this helps.