Need press 0 for operator to do a hook flash

Since I am integrating with a legacy PBX, when a caller dials 0 in the voicemail menu, I need something like this:

exten => s,1,Playback(transfer)
exten => s,2,Flash()
exten => s,3,SendDTMF(4800)
exten => s,4,Hangup()

That’s the easy part. What I don’t know is how to get this to apply to pressing 0 when prompted by voicemail.

The legacy PBX uses analog lines for voicemail, so currently, pressing 0 terminates the call.