A stalker who tracked a woman's movements, repeatedly tried to contact her and sent her threatening voice messages has been sentenced.