In the dialplan for an incoming call I a have set:
same => n,Set(TIMEOUT(absolute)=600)
In the dialplan the caller enters a queue.
A agent will answer the call from the queue and I would like to play a message to the agent 30 seconds before the call is ended by the TIMEOUT(absolute).
Any ideas how this could be achieved.
I’m thinking to define a AGI in the Queue command.
In the agi I can get the TIMEOUT(absolute) as a remaining time.
In the agi get the channel
Launch another script with the remaining time and the channel and wait for the remaining time -/- 30 to execute a ChannelSpy.
But I’m sure there is a more clever way to do it.