diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua b/resources/install/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua
index a4006530f3..73463563ef 100644
--- a/resources/install/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua
+++ b/resources/install/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua
@@ -93,11 +93,19 @@
if (string.len(queue_moh_sound) == 0) then
table.insert(xml, [[ ]]);
else
- if (string.sub(queue_moh_sound, 0, 15) == 'local_stream://') then
+ if (string.sub(queue_moh_sound, 0, 14) == 'tone_stream://' or string.sub(queue_moh_sound, 0, 2) == '${') then
+ --given this string --tone_stream://${us-ring};loops=-1 --return us-ring
+ a, b, tone_string = string.find(queue_moh_sound, ".*{(.*)}.*");
+ if (tone_string ~= nil) then
+ tone_string = trim(api:execute("global_getvar", tone_string));
+ table.insert(xml, [[ ]]);
+ end
+ elseif (string.sub(queue_moh_sound, 0, 15) == 'local_stream://') then
table.insert(xml, [[ ]]);
- elseif (string.sub(queue_moh_sound, 0, 2) == '${' and string.sub(queue_moh_sound, -5) == 'ring}') then
- table.insert(xml, [[ ]]);
else
+ if (queue_moh_sound == nil or queue_moh_sound == "") then
+ queue_moh_sound = "local_stream://default";
+ end
table.insert(xml, [[ ]]);
end
end