diff --git a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/directory/directory.lua b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/directory/directory.lua index 395df2abb2..fd7e68b8f3 100644 --- a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/directory/directory.lua +++ b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/directory/directory.lua @@ -29,7 +29,7 @@ -- Luis Daniel Lucio Quiroz --set the default -continue = true; + continue = true; --get the action action = params:getHeader("action"); @@ -203,6 +203,11 @@ continue = true; end end + --get the dial_string from default settings + local Settings = require "resources.functions.lazy_settings" + local settings = Settings.new(dbh, domain_name, domain_uuid); + dial_string = settings:get('domain', 'dial_string', 'text'); + --prevent processing for invalid domains if (domain_uuid == nil) then continue = false; @@ -391,6 +396,7 @@ continue = true; elseif (string.len(row.dial_string) > 0) then dial_string = row.dial_string; else + --set the destintion local destination = (DIAL_STRING_BASED_ON_USERID and sip_from_number or sip_from_user) .. "@" .. domain_name; --set a default dial string if (dial_string == null) then