I'm attempting to play a sound when someone hangs up the phone in Asterisk 15.2.2 however after hanging up 2 beeps are heared and the connection breaks without playing the audio file. This is the current dialplan I have:
[macro-callwithhelloworld]
exten => s,1,Wait(1)
same => n,Playback(hello-world)
same => n,Dial(${ARG1},20)
same => n,Hangup()
same => n,Answer()
same => n,Playback(hello-world)
[from-internal]
exten=>6001,1,Macro(callwithhelloworld,SIP/demo)
How can I make it so "hello-world" is played when someone hangs up?