diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua b/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua
index 09384dffd0..05cdaeeabd 100644
--- a/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua
+++ b/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua
@@ -34,16 +34,17 @@
--get the action
action = params:getHeader("action");
purpose = params:getHeader("purpose");
- --sip_auth - registration
- --group_call - call group has been called
- --user_call - user has been called
+ --sip_auth - registration
+ --group_call - call group has been called
+ --user_call - user has been called
--additional information
- --event_calling_function = params:getHeader("Event-Calling-Function");
+ --event_calling_function = params:getHeader("Event-Calling-Function");
---set the variables as a string to prevent nil errors
+--set the variables as a string
number_alias = "";
number_alias_string = "";
+ vm_mailto = "";
--determine the correction action to perform
if (purpose == "gateways") then
@@ -380,6 +381,9 @@
table.insert(xml, [[ ]]);
table.insert(xml, [[ ]]);
table.insert(xml, [[ ]]);
+ if (string.len(number_alias) > 0) then
+ table.insert(xml, [[ ]]);
+ end
--table.insert(xml, [[ ]]);
table.insert(xml, [[ ]]);
table.insert(xml, [[ ]]);
@@ -487,6 +491,13 @@
end
end
+ --disable registration for number-alias
+ if (params:getHeader("type") ~= "attr") then
+ if (api:execute("user_data", user .. "@" .. domain_name .." attr id") ~= user) then
+ XML_STRING = nil;
+ end
+ end
+
--get the XML string from the cache
if (source == "cache") then
--replace the ' back to a single quote
@@ -517,4 +528,4 @@
--send the xml to the console
if (debug["xml_string"]) then
freeswitch.consoleLog("notice", "[xml_handler] XML_STRING: \n" .. XML_STRING .. "\n");
- end
\ No newline at end of file
+ end