Update record_greeting.lua
This commit is contained in:
parent
1f8d92d759
commit
f1e45f2aaa
|
|
@ -29,14 +29,22 @@
|
||||||
|
|
||||||
--define a function to record the greeting
|
--define a function to record the greeting
|
||||||
function record_greeting(greeting_id, menu)
|
function record_greeting(greeting_id, menu)
|
||||||
local db = dbh or Database.new('system')
|
|
||||||
local settings = Settings.new(db, domain_name, domain_uuid)
|
|
||||||
|
|
||||||
local max_len_seconds = settings:get('voicemail', 'greeting_max_length', 'numeric') or 90;
|
--setup the database connection
|
||||||
|
local db = dbh or Database.new('system')
|
||||||
|
|
||||||
|
--get the voicemail settings
|
||||||
|
local settings = Settings.new(db, domain_name, domain_uuid)
|
||||||
|
|
||||||
|
--set the maximum greeeting length
|
||||||
|
local max_len_seconds = settings:get('voicemail', 'greeting_max_length', 'numeric') or 90;
|
||||||
|
|
||||||
--flush dtmf digits from the input buffer
|
--flush dtmf digits from the input buffer
|
||||||
session:flushDigits();
|
session:flushDigits();
|
||||||
|
|
||||||
|
--disable appending to the recording
|
||||||
|
session:setVariable("record_append", "false");
|
||||||
|
|
||||||
--choose a greeting between 1 and 9
|
--choose a greeting between 1 and 9
|
||||||
if (greeting_id == nil) then
|
if (greeting_id == nil) then
|
||||||
if (session:ready()) then
|
if (session:ready()) then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue