I think you can export it to the other leg on the bridgem I think that may be why I set a seperate variable for something or other, can't remember right now.
require "resources.functions.config";
require "resources.functions.settings";
test = session:getVariable("nolocal:api_on_answer");
freeswitch.consoleLog("notice",test);
test = session:getVariable("uuid");
freeswitch.consoleLog("notice",test);
test = session:getVariable("bridge_uuid");
freeswitch.consoleLog("notice",test);
--make sure the session is ready
if ( session:ready() ) then
--set the sounds path for the language, dialect and voice
default_language = session:getVariable("default_language");
default_dialect = session:getVariable("default_dialect");
default_voice = session:getVariable("default_voice");
if (not default_language) then default_language = 'en'; end
if (not default_dialect) then default_dialect = 'us'; end
if (not default_voice) then default_voice = 'callie'; end
--get the variables
if (session:getVariable("masked") == null) then
masked = "false";
else
masked = session:getVariable("masked");
end
onAnswer = session:getVariable("nolocal:api_on_answer");
if (onAnswer == null) then
onAnswer = session:getVariable("api_on_answer");
end
onAnswerPath = string.gsub(onAnswer, ".* start ", "");
onAnswerUUID = string.sub(onAnswer, 13, 48);
--mask or unmask the recording
api = freeswitch.API();
if (masked == "false") then
freeswitch.consoleLog("notice", "[recording] Masking call "..onAnswerUUID.."\n");
cmd = "uuid_record "..onAnswerUUID.." mask "..onAnswerPath;
reply = api:executeString(cmd);
if (string.sub(reply, 0, 1) == "-") then
sound = "uuid_broadcast "..onAnswerUUID.." "..sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/misc/error.wav both";
freeswitch.consoleLog("notice", "[recording] Masking failed :: "..cmd.." :: "..reply.."\n");
else
sound = "uuid_broadcast "..onAnswerUUID.." "..sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/ivr/ivr-recording_paused.wav both";
session:setVariable("masked", "true");
end
api:executeString(sound);
else
freeswitch.consoleLog("notice", "[recording] Unmasking call "..onAnswerUUID.."\n");
cmd = "uuid_record "..onAnswerUUID.." unmask "..onAnswerPath;
reply = api:executeString(cmd);
if (string.sub(reply, 0, 1) == "-") then
sound = "uuid_broadcast "..onAnswerUUID.." "..sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/misc/error.wav both";
freeswitch.consoleLog("notice", "[recording] Unmasking failed :: "..cmd.." :: "..reply.."\n");
else
sound = "uuid_broadcast "..onAnswerUUID.." "..sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/ivr/ivr-recording_started.wav both";
session:setVariable("masked", "false");
end
api:executeString(sound);
end
end
[\code]
Guys I need to make Fusion starts the record once the calls starts to ring any help?
currently it starts the record on answer.
any help where to start looking ?
by default it should start before it rings.
thanks in advanced.
Why do you guy just use the *2 option to disable and restart the recordings. After some mods to the default dial plans it seems to work great. No Scripts needed.
View attachment 665
local,*2,exec:record_session,$${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext},${bind_target}Hi, Could I get that line in full so I can check my dialplan please? Also need to get this working for GDPR!
I have had this issue since 2017. My clients that take on-line credit card details and need call recording activated but must be able to toggle it. They are threatening to pull their business from me because they cant comply with GDPR. This has been going on since 2017 and still no solution.. this is big issue for me as i cannot afford to lose clients. I also can't sell my services to new clients either as this is a service they are asking for.
Other solutions can do this and it is a basic requirement for most businesses that take online payments. Matthew Main has been trying his best to get a resolution, but we are now about to hit a wall. Is there an end in sight to this before I have to seriously consider moving to another platform?
There seems to be a rather lacklustre response to what is major flaw in the product. If anyone has a solution to this, please contact my Tech Matthew Main (see above) with a solution.