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