Allow Phrases to be used in IVRs (#4263)

With the current implementation, Phrases cannot be used in IVRs as streamfile.lua prevents keypresses from being passed back to the IVR. This fix makes a small change to the way phrases are stored and allows streamfile to be run without blocking IVR keypresses.
This commit is contained in:
jpattWPC
2019-06-05 22:12:13 -05:00
committed by FusionPBX
parent 4ae27f13b6
commit 3a6dcdd340
2 changed files with 8 additions and 6 deletions

View File

@@ -98,8 +98,8 @@
or file_name
end
--stream file if exists
if (session:ready()) then
--stream file if exists, If being called by luarun output filename to stream
if (session:ready() and stream == nil) then
session:answer();
local slept = session:getVariable("slept");
if (slept == nil or slept == "false") then
@@ -112,6 +112,8 @@
session:setInputCallback("on_dtmf", "");
session:streamFile(file_name);
session:unsetInputCallback();
else
stream:write(file_name);
end
--if base64, remove temp file (increases responsiveness when files remain local)