mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-04 18:53:49 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user