dialed_extensions was nil when coming from ringing group

This commit is contained in:
luis daniel lucio quiroz
2013-12-22 19:06:00 +00:00
parent d69e4983f9
commit aa69e59b0c

View File

@@ -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
end