summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-04-11 10:49:30 +0200
committerPeter Kozak <spag@golwen.net>2013-04-11 10:49:30 +0200
commit720a55fd2540e74a84ef2113ad9475bb56f364c0 (patch)
treef794636f537c7c9c6fd65009081cf75ac124e928 /misc
parentf89c54f914741e2aaa6d4910cd33eaa2bd7fedf3 (diff)
beep added
Diffstat (limited to 'misc')
-rw-r--r--misc/freeswitch/scripts/dialplan/ivr.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/misc/freeswitch/scripts/dialplan/ivr.lua b/misc/freeswitch/scripts/dialplan/ivr.lua
index e6ddd58..6b230dc 100644
--- a/misc/freeswitch/scripts/dialplan/ivr.lua
+++ b/misc/freeswitch/scripts/dialplan/ivr.lua
@@ -146,16 +146,23 @@ function Ivr.check_pin(self, phrase_enter, phrase_incorrect, pin, pin_timeout, p
end
-function Ivr.record(self, file_name, phrase_record, phrase_too_short, record_length_max, record_length_min, record_repeat, silence_level, silence_lenght_abort)
+function Ivr.record(self, file_name, beep, phrase_record, phrase_too_short, record_length_max, record_length_min, record_repeat, silence_level, silence_lenght_abort)
local duration = nil;
for index=1, record_repeat do
if (duration and duration >= record_length_min) or not self.caller:ready() then
break;
elseif duration then
self.caller:send_display('Recording too short');
- self.caller.session:sayPhrase(phrase_too_short);
+ if phrase_too_short then
+ self.caller.session:sayPhrase(phrase_too_short);
+ end
+ end
+ if phrase_record then
+ self.caller.session:sayPhrase(phrase_record);
+ end
+ if beep then
+ self.caller:playback(beep);
end
- self.caller.session:sayPhrase(phrase_record);
self.caller:send_display('Recording...');
local result = self.caller.session:recordFile(file_name, record_length_max, silence_level, silence_lenght_abort);
duration = self.caller:to_i('record_seconds');