mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 19:53:56 +00:00
Toll-allow into dialstring for external calls (#4495)
Insert toll-allow from the original extension into the dialstring for external calls.
This commit is contained in:
@@ -98,7 +98,7 @@
|
||||
--forward_busy_destination = trim(api:executeString(cmd));
|
||||
|
||||
--select data from the database
|
||||
local sql = "select follow_me_uuid ";
|
||||
local sql = "select follow_me_uuid, toll_allow ";
|
||||
sql = sql .. "from v_extensions ";
|
||||
sql = sql .. "where domain_uuid = :domain_uuid ";
|
||||
sql = sql .. "and ( ";
|
||||
@@ -111,6 +111,7 @@
|
||||
end
|
||||
status = dbh:query(sql, params, function(row)
|
||||
follow_me_uuid = row["follow_me_uuid"];
|
||||
extension_toll_allow = row["toll_allow"];
|
||||
end);
|
||||
--dbh:query(sql, params, function(row);
|
||||
|
||||
@@ -287,6 +288,9 @@
|
||||
else
|
||||
--external number
|
||||
route_bridge = 'loopback/'..destination_number;
|
||||
if (extension_toll_allow ~= nil) then
|
||||
toll_allow = extension_toll_allow:gsub(",", ":");
|
||||
end
|
||||
|
||||
--set the toll allow to an empty string
|
||||
if (toll_allow == nil) then
|
||||
|
||||
Reference in New Issue
Block a user