How do config to delete voice message

5001 dialing 5002
5001 login 5002 voicemail
5001 don’t want to leave this message, 5001 want delete this message.

how do config can let 5001 delete the message

You are not explaining enough. What message do you want deleted ?

I am sorry!
like below:
5001 dial 5002 (5002 always transfer to voice mail), 5001 login voicemail that will create a recording file in /var/spool/asterisk/voicemail/…, but 5001 don’t want leave this message, so 5001 hope to delete it.

how to config this function?