"You used your phone continuously to abuse and generally annoy her."
The victim couldn't sleep, couldn't eat and was frightened to leave the house on her own.
"She installed security cameras in her home," Judge Callaghan said.
"She is now in the care of a mental health team to help her cope."
Petch had previous convictions for assaulting a female and for breach of a protection order, which related to incidents in 2016. He also had a conviction for assaulting a female from 2007.
Judge Callaghan sentenced Petch to six months' jail and ordered him to attend non-violence and alcohol and drug treatment programmes.
"Home detention is not an appropriate response to behaviour like this. I'm not going to give you leave to apply for home detention," Judge Callaghan said.
He also issued a protection order in favour of the victim.