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