Playback() stop

When playing audio using the Playback function,
I want the voice to stop when I press the button value.
read() and background() are stopped, but how should playback() be stopped?
I’m asking for help because I don’t know if it will work.

exten => 100,2,playback(test)
exten => 100,3,Read(dig,2,5)

Even if you press the button, play continues.

The Playback() function will not stop playing the audio file, you would need to use the Background() function instead, and it will match the DTMF input as an extension on your dial-plan; If you want to play test but stop playing it once a DTMF digit is pressed, then you just need the read command:

exten => 100,2,Read(dig,test,2, ,1,5) ; max-digits 2, attempts 1, time-out 5s

test will stop playing once max-digits is reached

thank you Then just play the comment
To proceed, should I use the following?

exten => 100, 10 , Read(dig, info, 1,1,1)

You can either listen to it all or take the digits and move on.

Instead, if I listen to the end, I will wait one second and then move on.