Get the dial_string from default settings
This commit is contained in:
parent
8f269a56f9
commit
adcc0ad068
|
|
@ -203,6 +203,11 @@ continue = true;
|
||||||
end
|
end
|
||||||
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
|
--prevent processing for invalid domains
|
||||||
if (domain_uuid == nil) then
|
if (domain_uuid == nil) then
|
||||||
continue = false;
|
continue = false;
|
||||||
|
|
@ -391,6 +396,7 @@ continue = true;
|
||||||
elseif (string.len(row.dial_string) > 0) then
|
elseif (string.len(row.dial_string) > 0) then
|
||||||
dial_string = row.dial_string;
|
dial_string = row.dial_string;
|
||||||
else
|
else
|
||||||
|
--set the destintion
|
||||||
local destination = (DIAL_STRING_BASED_ON_USERID and sip_from_number or sip_from_user) .. "@" .. domain_name;
|
local destination = (DIAL_STRING_BASED_ON_USERID and sip_from_number or sip_from_user) .. "@" .. domain_name;
|
||||||
--set a default dial string
|
--set a default dial string
|
||||||
if (dial_string == null) then
|
if (dial_string == null) then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue