Add the toggle for follow me
This commit is contained in:
parent
e17723f47d
commit
377bd69939
|
|
@ -61,7 +61,6 @@
|
|||
session:answer();
|
||||
|
||||
--get the variables
|
||||
enabled = session:getVariable("enabled");
|
||||
pin_number = session:getVariable("pin_number");
|
||||
sounds_dir = session:getVariable("sounds_dir");
|
||||
domain_uuid = session:getVariable("domain_uuid");
|
||||
|
|
@ -101,6 +100,18 @@
|
|||
--freeswitch.consoleLog("NOTICE", "[call forward] accountcode "..row.accountcode.."\n");
|
||||
end);
|
||||
|
||||
--determine whether to update the dial string
|
||||
enabled = "false";
|
||||
sql = "select * from v_follow_me ";
|
||||
sql = sql .. "where domain_uuid = '"..domain_uuid.."' ";
|
||||
sql = sql .. "and follow_me_uuid = '"..follow_me_uuid.."' ";
|
||||
if (debug["sql"]) then
|
||||
freeswitch.consoleLog("notice", "[follow_me] "..sql.."\n");
|
||||
end
|
||||
status = dbh:query(sql, function(row)
|
||||
enabled = row.follow_me_enabled;
|
||||
end);
|
||||
|
||||
--set the dial string
|
||||
if (enabled == "true") then
|
||||
dial_string = "{presence_id="..forward_all_destination.."@"..domain_name;
|
||||
|
|
|
|||
Loading…
Reference in New Issue