No contact order

Can you get a no contact order or harassment order for someone that calls you on blocked caller ID or text free numbers??? When you’ve told them you don’t want to talk and if they contact you again you’ll get a restraining order??? But youre pregnant with their kid. I don’t want to talk to him but he states I’m pregnant with his kid so we need to talk.