Ondemand Call Recording - Recording Started Announcement

Status
Not open for further replies.

mcs3ss2

Active Member
Sep 8, 2020
258
27
28
AU
Hi Folks
I have enabled on demand call recording (*2) which is working fine.
I want to play a message (call recording started) when the recording is started. i.e as soon as the *2 is pressed.
Can someone point me to the right direction? If anyone has implemented this, can they share their experience please.
Thanks, hisheeraz
 

ad5ou

Active Member
Jun 12, 2018
884
197
43
Haven’t tried using on demand recording but it might be as simple as adding a playback action before or perhaps after the record session action.
 

mcs3ss2

Active Member
Sep 8, 2020
258
27
28
AU
I tried adding playback action and pointing to file wave file (in dialplan manager) but audio plays as soon as the destination number is dialed and call is connected. Without pressing *2 (for on demand recording to record active call).

When I press the feature code *2 the recording starts and I can play it back after the call is finished/ended but CALL RECORDING STARTED alert does not play.
here is the image of the dial plan manager

1620605476959.png


1620605582973.png

Any idea?
 

ad5ou

Active Member
Jun 12, 2018
884
197
43
After having a look at the dialplan it would take a bit more work to allow for additional actions to happen with *2 etc but it can work as desired.

Refer to section 3.3 of Freeswitch bind digit documentation https://freeswitch.org/confluence/plugins/servlet/mobile?contentId=3965705#content/view/6586414

The existing dialplan uses the command string to actually activate the recording instead of executing a certain other dialplan as in the example in link above.

if I have time in the next day or two I can build an example using Fusionpbx dialplan pages to show how to add the necessary changes.
 

mcs3ss2

Active Member
Sep 8, 2020
258
27
28
AU
3.3 in the above link means I need to create another dialplan.xml and call that in the origional dialplan?
 

ad5ou

Active Member
Jun 12, 2018
884
197
43
The Freeswitch documentation assumes everything is in dialplan.xml and usually in “default” domain/context. In the case of Fusionpbx, “default” would be your domain name for the tenant or $(domain_name)

The command can call any dialplan similar to how inbound routes usually transfer to <endpoint> XML mypbx.domain.com

it will require a new entry in the Fusionpbx dialplan for the new actions but can be added via the Fusionpbx GUI.
 

mcs3ss2

Active Member
Sep 8, 2020
258
27
28
AU
Here is the On_Demand_Recording XML File

XML:
<extension name="call_recording_on_demand" continue="true" uuid="ecd68472-d598-4869-acce-2986312be4aa">
    <condition field="${sip_authorized}" expression="true" break="never">
        <action application="set" data="bind_target=both" inline="true"/>
        <anti-action application="set" data="bind_target=peer" inline="true"/>
    </condition>
    <condition field="" expression="">
        <action application="bind_digit_action" data="local,*2,exec:record_session,${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext},${bind_target}"/>
        <action application="digit_action_set_realm" data="local"/>
        <action application="bind_digit_action" data="local,*5,api:uuid_record,${uuid} mask ${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext},${bind_target}"/>
        <action application="bind_digit_action" data="local,*6,api:uuid_record,${uuid} unmask ${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext},${bind_target}"/>
    </condition>
</extension>

I cannot figure out where to put the wave file link so it may work (play message)
 

mcs3ss2

Active Member
Sep 8, 2020
258
27
28
AU
When I type the below line just above first bind_digit_action
XML:
<action application="bind_digit_action" data="*2,lua:streamfile.lua Call_Recording_Started.wav"/>
Nothing happens, no recording alert, no recording
 

ad5ou

Active Member
Jun 12, 2018
884
197
43
An example of how it would need to be is in the bind_digit dial plan.
1620673469993.png

So the on demand call recording would need to have similar.
Edit the on_demand dial plan to exec recondemand XML ...
1620673646287.png
Create a new dial plan call recondemand using the GUI press Add in Dial plan manager
1620673816426.png
The name above isn't important but labels the new dial plan.
The condition 1 should match the dial plan name entered in the on demand exec statement.
The 2 actions aren't important and will be edited after the dial plan is created.
Find the newly created dialplan (order 200) and edit the actions etc as needed
1620674419117.png
 

mcs3ss2

Active Member
Sep 8, 2020
258
27
28
AU
Thank you @ad5ou for taking time however there is still no joy, does this makes any sens what i did here for both dialplans

1620919099462.png


1620919108614.png
 

Attachments

  • 1620918928399.png
    1620918928399.png
    39.3 KB · Views: 9

ad5ou

Active Member
Jun 12, 2018
884
197
43
Your second *2 action is overriding the first one. disable the second (original one)
It looks like you have a typo in the first *2 action data should be ${context} but you have ${contxt} <--missing the "e".

Add to your "record_announce_alert" dialplan
action record_session <path/to/blah/blah/blah.wav> (path/filename can be copied from original string above)
 

mcs3ss2

Active Member
Sep 8, 2020
258
27
28
AU
did not work out this time again
here is the dialplan

1621097528103.png

1621097599515.png

1621097761336.png

What am I doing wrong?
 

Attachments

  • 1621097437951.png
    1621097437951.png
    5.1 KB · Views: 13

ad5ou

Active Member
Jun 12, 2018
884
197
43
Almost there. Your "record_session" shouldn't be a direct copy from previous dial plans.
action record_session $${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext},${bind_target}
 

mcs3ss2

Active Member
Sep 8, 2020
258
27
28
AU
Hi mate, thank you for getting back to me, I am not getting what you are trying to convey. there are no similarities between record_announce_alert and call_recording_on_deman

this line exists on record_announce_alert only

Code:
action record_session $${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext},${bind_target}

Am I missing something?
 
Last edited:

ad5ou

Active Member
Jun 12, 2018
884
197
43
Your screenshot of "record_announce_alert" showed the data field as the original bind digit action data.
1621343385030.png
This should show the path/filename variables for recording the session.

Also
1621343637916.png
Continue should be set to "true"
 
Status
Not open for further replies.