BT Call Protect is a landline feature that lets you add phone numbers to a blocklist, as well as applying BT's own blocklist. Blocked calls are sent to junk voicemail.
Once you have BT Call Protect you can dial
1572 to manage it, which includes the option to block the last caller.
Unfortunately you can only block 100 numbers. Once the blocklist is full you have to delete a number before adding a new one, which is a tedious process when dialling 1572. It's quicker to do this online via My BT.