Another adjustment for follow me toggle

This commit is contained in:
Mark Crane 2014-07-29 09:52:27 +00:00
parent eb95e15753
commit eb70a35c73
1 changed files with 4 additions and 4 deletions

View File

@ -117,7 +117,7 @@
end); end);
--set follow me --set follow me
if (enabled == "true") then if (enabled == "false") then
--answer and play a tone --answer and play a tone
session:answer(); session:answer();
api = freeswitch.API(); api = freeswitch.API();
@ -130,7 +130,7 @@
end end
--unset follow me --unset follow me
if (enabled == "false") then if (enabled == "true") then
--answer and play a tone --answer and play a tone
session:answer(); session:answer();
api = freeswitch.API(); api = freeswitch.API();
@ -161,9 +161,9 @@
--update the extension --update the extension
sql = "update v_extensions set "; sql = "update v_extensions set ";
if (enabled == "true") then if (enabled == "true") then
sql = sql .. "dial_string = '"..dial_string.."', ";
else
sql = sql .. "dial_string = null, "; sql = sql .. "dial_string = null, ";
else
sql = sql .. "dial_string = '"..dial_string.."', ";
end end
sql = sql .. "do_not_disturb = 'false', "; sql = sql .. "do_not_disturb = 'false', ";
sql = sql .. "forward_all_enabled= 'false' "; sql = sql .. "forward_all_enabled= 'false' ";