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:
Alexey Melnichuk
2015-11-26 17:23:33 +03:00
parent 35752445c3
commit ac44787e36
5 changed files with 47 additions and 15 deletions

View File

@@ -132,6 +132,12 @@ local function check()
end
local function task()
local session_uuid = session:getVariable('uuid')
session:setVariable('fax_queue_task_session', session_uuid)
log.infof("SESSION UUID: %s", session_uuid)
session:waitForAnswer(session)
while not session:answered() do