How to stop Playback when a digit is detected?

Hello everyone
I have one problem.
How to stop Playback when a digit is detected?

exten=>.,1,Set(CALLERID(num)=${cid})
exten=>
.,n,Gosub(monitor,${EXTEN},1)
same => _X!,1,Answer()
same => n,WaitForSilence(1500,1)
same=> n,Playback(/welcome)
same=>n,WaitExten(3)

if someone know this, please help me.

Use Read() or BackGround()

https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Application_Read

https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Application_Background

if use background(), can i use url?
in playback, I used “https://xx.xx/xxx.wav
can i use above url in background() too?

I have never tried it with a URL. Try and report back…

I tried to use background().
it works.
and it allow url link.
thanks

1 Like