Update index.lua
This commit is contained in:
parent
c219d8e3e9
commit
0eff03860b
|
|
@ -158,13 +158,22 @@
|
|||
end
|
||||
end
|
||||
if (call_block_app ~= nil and call_block_data ~= nil) then
|
||||
if (call_block_app == 'extension') then
|
||||
if (session:ready()) then
|
||||
session:execute('set', 'call_block_uuid='..call_block_uuid);
|
||||
session:execute('set', 'call_block_app='..call_block_app);
|
||||
session:execute('set', 'call_block_data='..call_block_data);
|
||||
session:execute("transfer", call_block_data..' XML '.. context);
|
||||
freeswitch.consoleLog("notice", "[call_block] caller id number " .. caller_id_number .. " action: extension ".. call_block_data.."\n");
|
||||
end
|
||||
end
|
||||
if (call_block_app == 'voicemail') then
|
||||
if (session:ready()) then
|
||||
session:execute('set', 'call_block_uuid='..call_block_uuid);
|
||||
session:execute('set', 'call_block_app='..call_block_app);
|
||||
session:execute('set', 'call_block_data='..call_block_data);
|
||||
session:execute("transfer", '*99'..call_block_data..' XML '.. context);
|
||||
freeswitch.consoleLog("notice", "[call_block] caller id number " .. caller_id_number .. " action: *99".. call_block_data.."\n");
|
||||
freeswitch.consoleLog("notice", "[call_block] caller id number " .. caller_id_number .. " action: voicemail *99".. call_block_data.."\n");
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue