mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-05 19:23:49 +00:00
Fix. problem when same session can release task multiple times.
It can be when originate has group dial-string. So it call `api_hangup_hook` for each channel. Now we release task in `retry.lua` only if originate success and this is same channel which execute `exec.lua`. If originate fail we release task `next.lua`
This commit is contained in:
@@ -103,6 +103,14 @@ local remove_finished_tasks_sql = [[
|
||||
delete from v_fax_tasks where task_status > 3
|
||||
]]
|
||||
|
||||
local function serialize(task, header)
|
||||
local str = header or ''
|
||||
for k, v in pairs(task) do
|
||||
str = str .. ('\n %q = %q'):format(tostring(k), tostring(v))
|
||||
end
|
||||
return str
|
||||
end
|
||||
|
||||
local function get_db()
|
||||
if not db then
|
||||
db = assert(Database.new('system'))
|
||||
|
||||
Reference in New Issue
Block a user