Turn Off Active Call Recording

Status
Not open for further replies.

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
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.
 

Rick Hodger

New Member
Jul 21, 2017
3
1
3
Ugh. This is more horrible than I thought.

Further testing has revealed:

* On internal calls, the recording is performed on one of the leg UUIDs.
* On external inbound calls, the recording is performed on the bridge UUID.
* On external outbound calls, I've no idea. The bind_digit_action doesn't appear to work.

This version of the script fixes the first two issues by extracting the UUID from the api_no_answer variable. I don't know how to fix the third.

Code:
        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]
 
May 16, 2017
103
7
18
38
Hi All

Sorry to be such a noob - I want to test the script live but how do i add this in the dialplan manager?

Kind Regards

Andy
 

tomellerby

New Member
Apr 16, 2018
2
0
1
39
The error what i get when i have transferred the call and then try and mask is the following

[recording] Masking failed :: uuid_record 2b088530-fdee-49ac-8532-22c1ab3dc694 mask /var/lib/freeswitch/recordings/sip.example.com/archive/2018/Apr/16/2b088530-fdee-49ac-8532-22c1ab3dc694.mp3 :: -ERR Cannot locate session!
 

GreenLife

New Member
Jun 6, 2018
2
0
1
30
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.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
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.

You can start by not hijacking other peoples threads, make your own.
 

screwloose

Member
Feb 5, 2017
49
9
8
40
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.
1548069707616.png
 
  • Like
Reactions: TimGuyUK

Matthew Main

Member
Jan 24, 2017
92
5
8
39
Hey guys i cant get this working, any help please.

Script is in the right place, i have added to the varibales in the dialplan manager, still its not working.

Any ideas

cheers
 

screwloose

Member
Feb 5, 2017
49
9
8
40
Hi, Could I get that line in full so I can check my dialplan please? Also need to get this working for GDPR!
local,*2,exec:record_session,$${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext},${bind_target}

Is the full string. Its in the default fusion install under bind_digit_action. Also it was giving me issues with my recordings.
 
  • Like
Reactions: TimGuyUK

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
I could have sworn record session does not allow you to pause/resume.
 

stripey1960

New Member
Dec 3, 2018
4
0
1
64
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.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,038
556
113
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.

Could you possibly list some of these solutions that have it?
 

stripey1960

New Member
Dec 3, 2018
4
0
1
64
The first one I called offer it: Ring Central. No idea what engine they use, but it is probably propitiatory. 3CX said their solution does it. Express Telephony( again don't know what PBX they are using)

Agreed these are paid for products, but you can even apparently do it in Asterisk (which we all know is opensource) when including the following in the dial-plan:

exten => 1063,1,Answer
exten => 1063,n,Monitor(wav,${CALLDIR}${UNIQUEID},mb)
exten => 1063,n,Set(DYNAMIC_FEATURES=pauseMonitor#unpauseMonitor#startMonitor)
exten => 1063,n,Dial(SIP/1063,20)
exten => 1063,n,Hangup

[macro-recpause]
exten => s,1,Playback(disabled)
exten => s,n,PauseMonitor()
exten => s,n,MacroExit

[macro-recunpause]
exten => s,1,Playback(enabled)
exten => s,n,UnPauseMonitor()
exten => s,n,MacroExit

features.conf as
pauseMonitor => #1,self/caller,Macro,recpause,monitor-disabled
unpauseMonitor => #3,self/caller,Macro,recunpause,monitor-enabled

[monitor-disabled]
mode=files
directory=/var/lib/asterisk/sounds/en/
[monitor-enabled]
mode=files
directory=/var/lib/asterisk/sounds/en/

I am sure there is a bit more involved than that (including call recording in the first place for instance), but it does work.

I have a perpetual licence for an Asterisk GUI called Mirta, which also allows record pausing with Asterisk. The main thing stopping me going back to Asterisk again is having to pay for a tech to build a new cluster of servers and trying to migrate all my clients back across, which is just painful to even think about.

I run a small lean business and I have to leverage these products if I am going to survive, so setup costs for me (not a linuxy person) is prohibitive.
 

1stbyte

New Member
Oct 31, 2019
4
0
1
34
Hi All,

When i try and pause/mask call recordings for credit card purposes I have set the following;

This part masks the call

Action - bing digit action - local,*7,api:uuid_record,${uuid} mask ${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext},${bind_target}

This part unmasks the call.

Action - bing digit action - local,*8,api:uuid_record,${uuid} unmask ${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext},${bind_target}

However this works perfectly if you dial out to the end user if the end user dials in to your PBX then this does not work, can any one help on this.

Thanks
 
Status
Not open for further replies.