From 23fb7118a649a7e380d4ddbebb60799be330e9bc Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 23 Jun 2016 16:42:12 -0600 Subject: [PATCH] Update local_stream.conf.lua Music on hold set the default timer name to 'soft'. --- .../scripts/configuration/local_stream.conf.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/configuration/local_stream.conf.lua b/resources/install/scripts/app/xml_handler/resources/scripts/configuration/local_stream.conf.lua index ade6991b4c..e2a84ce09d 100644 --- a/resources/install/scripts/app/xml_handler/resources/scripts/configuration/local_stream.conf.lua +++ b/resources/install/scripts/app/xml_handler/resources/scripts/configuration/local_stream.conf.lua @@ -32,7 +32,7 @@ chime_list = ""; for k,v in pairs(chime_array) do f = explode("/", v); - if (file_exists(sounds_dir.."/en/us/callie/"..f[1].."/8000/"..f[2])) then + if (f[1] ~= nil and f[2] ~= nil and file_exists(sounds_dir.."/en/us/callie/"..f[1].."/8000/"..f[2])) then chime_list = chime_list .. sounds_dir.."/en/us/callie/"..v; else chime_list = chime_list .. v; @@ -40,13 +40,20 @@ end end + --set the default timer name to soft + if (row.music_on_hold_timer_name == nil) then + timer_name = "soft"; + else + timer_name = row.music_on_hold_timer_name; + end + --build the xml ]]..row.music_on_hold_name..[[" table.insert(xml, [[ ]]); table.insert(xml, [[ ]]); table.insert(xml, [[ ]]); table.insert(xml, [[ ]]); table.insert(xml, [[ ]]); - table.insert(xml, [[ ]]); + table.insert(xml, [[ ]]); if (chime_list ~= nil) then table.insert(xml, [[ ]]); end