mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Add fax detection when adding a dialplan destination if the fax extension is set
This commit is contained in:
@@ -45,12 +45,15 @@
|
||||
--freeswitch.consoleLog("notice", "SQL:" .. sql .. "\n");
|
||||
assert(dbh:query(sql, function(row)
|
||||
|
||||
|
||||
--set the outbound caller id
|
||||
if (outbound_caller_id_name ~= nil) then
|
||||
session:execute("export", "caller_id_name="..outbound_caller_id_name);
|
||||
session:execute("export", "effective_caller_id_name="..outbound_caller_id_name);
|
||||
end
|
||||
if (outbound_caller_id_number ~= nil) then
|
||||
session:execute("export", "caller_id_number="..outbound_caller_id_number);
|
||||
session:execute("export", "effective_caller_id_number="..outbound_caller_id_number);
|
||||
end
|
||||
|
||||
--set the local variables
|
||||
@@ -88,9 +91,19 @@
|
||||
var[key] = value;
|
||||
end
|
||||
|
||||
--set the outbound caller id
|
||||
if (outbound_caller_id_name ~= nil) then
|
||||
session:execute("export", "caller_id_name="..outbound_caller_id_name);
|
||||
session:execute("export", "effective_caller_id_name="..outbound_caller_id_name);
|
||||
end
|
||||
if (outbound_caller_id_number ~= nil) then
|
||||
session:execute("export", "caller_id_number="..outbound_caller_id_number);
|
||||
session:execute("export", "effective_caller_id_number="..outbound_caller_id_number);
|
||||
end
|
||||
|
||||
--send to the console
|
||||
freeswitch.consoleLog("notice", "[app:dialplan:outbound:is_local] " .. cache .. " source: memcache\n");
|
||||
|
||||
--transfer the call
|
||||
session:transfer(var["destination_number"], "XML", var["destination_context"]);
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user