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 f5b867e79b..c92e8670e0 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 @@ -91,10 +91,15 @@ --set the variable from the params dialed_extension = params:getHeader("dialed_extension"); if (dialed_extension == nil) then - --freeswitch.consoleLog("notice", "[xml_handler-directory.lua] dialed_extension is null\n"); - load_balancing = false; + freeswitch.consoleLog("notice", "[xml_handler-directory.lua] dialed_extension is null, trying to build from user\n"); + if (user == nil) then + load_balancing = false; + else + freeswitch.consoleLog("notice", "[xml_handler-directory.lua] dialed_extension built from user: " .. dialed_extension .. "\n"); + dialed_extension = user; + end else - --freeswitch.consoleLog("notice", "[xml_handler-directory.lua] dialed_extension is " .. dialed_extension .. "\n"); + freeswitch.consoleLog("notice", "[xml_handler-directory.lua] dialed_extension is " .. dialed_extension .. "\n"); end --if load balancing is set to true then get the hostname @@ -444,4 +449,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