I have some code in Lua that answers a call, and after performing a series of operations bridges the call to a new leg.
The operations take from a few seconds to several minutes.
To keep the client I need to play a sound the issue I have is that the playback is still going on after the call is bridged.
The specific question is, how to stop a sound called from a playback ?
My code looks like
session:answer()
session:execute("playback", '/some/file.wav')
.
.
.
local connectionString = '{bypass_media=true,origination_caller_id_number=555,destination_number=646}'
connectionString = connectionString .. 'sofia/external/192.168.0.1@1000'
session:execute('bridge', connectionString)