Play sound during call after {X} minutes


#1

Is there any way to automatically play a tone or sound in an active call after a specified number of minutes?

I am using Asterisk 13.22.0, and one of my trunks automatically disconnects calls after 180 minutes. I would like to be able to play a warning tone or sound, so that the call ending isn’t just a sudden disconnect. In an ideal world, there would be several warnings, but even one would be an improvement.

Thanks in advance for any tips and advice (beyond “get a different trunk”).


#2

A quick example to give you some hints

[inbound]
exten=>200,1,set(LIMIT_WARNING_FILE=beep)
same=>n,Set(LIMIT_PLAYAUDIO_CALLER=yes)
same=>n,Set(LIMIT_PLAYAUDIO_CALLEE=yes)
same=>n,Set(LIMIT_TIMEOUT_FILE=demo-thanks)
same=>n,Dial(Local/200@mymusic,L(60000:30000:10000))

[mymusic]
exten=>200,1,Answer()
same=>n,MusicOnHold(default)

Limit call to 60 seconds, play a beep every 10 seconds, and at the end play the asterisk-demo thanks message