Add fax detection when adding a dialplan destination if the fax extension is set

This commit is contained in:
Mark Crane
2014-07-02 06:21:20 +00:00
parent a4e54c3ad3
commit 3000dc9f61
2 changed files with 79 additions and 1 deletions

View File

@@ -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