Yannick
Yannick

Reputation: 476

Asterisk playback after hangup

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?

Upvotes: 1

Views: 1841

Answers (1)

arheops
arheops

Reputation: 15259

Caller A call to called party B

There is NO any possible way play something to A when A hangup. Just becuase he/she dropped chanel and you have no channel.

It is posible playback to caller if called party hangup. for that use 'g' option in Dial and not use Hangup.

same => n,Dial(${ARG1},20,g)
same => n,Playback(hello-world)

Upvotes: 2

Related Questions