From 3ca2b832ca18a4b124c5602d8e80aa734b36f636 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 30 Jun 2016 01:40:48 -0600 Subject: [PATCH] Update local_stream.conf.lua Changes to the conditions that build the name to make sure it builds it correctly. --- .../resources/scripts/configuration/local_stream.conf.lua | 5 +++-- 1 file changed, 3 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 0c2f028616..a066afb0e9 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 @@ -23,13 +23,14 @@ end x = 0; dbh:query(sql, function(row) + --combine the name, domain_name and the rate name = ''; - if (row.domain_uuid ~= nil) then + if (row.domain_uuid ~= nil and string.len(row.domain_uuid) > 0) then name = row.domain_name..'/'; end name = name .. row.music_on_hold_name; - if (row.music_on_hold_rate ~= nil or row.music_on_hold_rate == '') then + if (row.music_on_hold_rate ~= nil and #row.music_on_hold_rate > 0) then name = name .. '/' .. row.music_on_hold_rate; end