Workaround
Couldn't find a solution, but this workaround effectively solved the problem:
Set up sched_transfer
to a non-existent extension, which will
result in a hangup with No route, Aborting
, unless aborted with
sched_cancel
.
Below is a Lua example, but this strategy would work in the dialplan just the same because the sched_*
commands are all dialplan applications (i.e., part of mod_dptools
).
session:execute("sched_transfer", "+600 9999 XML default")
-- ...
local lsi = session:getVariable("last_sched_id")
session:execute("sched_cancel", tostring(lsi))