Is there anyway you can block contacts from without jailbreak on the iphone 4

An ex is really bothering me now and i've been searching all day for solutions i've rang my service provider and they said they can't do anything and the only way i've seen is to jailbreak it? All i want to do is block a phone number, why does this seem impossible for such a simple thing for most phones?

Just say this:
(Error 462: The number you are trying to reach is no longer in service. Please try again later.)

*Or just call your carrier and ask them.