mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-07 04:03:49 +00:00
Update disa.lua (#2959)
Play user defined greeting befor asking of pin. Usage: <application action="set" data="sound_greeting=/mysounds/mygreeting.wav"/>
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
|
||||
--get and save the variables
|
||||
if (session:ready()) then
|
||||
sound_greeting = session:getVariable("sound_greeting");
|
||||
pin_number = session:getVariable("pin_number");
|
||||
sounds_dir = session:getVariable("sounds_dir");
|
||||
caller_id_name = session:getVariable("caller_id_name");
|
||||
@@ -73,6 +74,12 @@
|
||||
digit_max_length = "11";
|
||||
end
|
||||
|
||||
--if the sound_greeting is provided then play it
|
||||
if (session:ready() and sound_greeting) then
|
||||
session:streamFile(sound_greeting);
|
||||
session:sleep(200);
|
||||
end
|
||||
|
||||
--if the pin number is provided then require it
|
||||
if (session:ready() and pin_number) then
|
||||
min_digits = string.len(pin_number);
|
||||
|
||||
Reference in New Issue
Block a user