The problem is your wife
Not to consider the many ways to avoid getting calls from your wife's ex-boyfriend, even if your wife does get calls from his ex', she can just simply hang up, or tell him to off, then there will be no problem.
You should talk to your wife, not seeking ways to block other's call. At least now you know what is happening, what if your wife accepts his ex's call behind you? e.g. in her office, or with her personal cell phone.