diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua b/resources/install/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua
index 0653cffd6c..31611c0150 100644
--- a/resources/install/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua
+++ b/resources/install/scripts/app/xml_handler/resources/scripts/dialplan/dialplan.lua
@@ -259,6 +259,7 @@
if (first_action) then
table.insert(xml, [[ ]]);
if (domain_uuid ~= nil and domain_uuid ~= '') then
+ domain_name = domains[domain_uuid];
table.insert(xml, [[ ]]);
end
if (domain_name ~= nil and domain_name ~= '') then