Record Call

About Record Call

Schema

Start a call recording

KeyDescriptionTypeDefaultRequiredSupport Level
actionWhether to start/stop the recording`string(‘mask''unmask''start''stop'
dtmf_legstring()false
formatWhat format to store the recording`string(‘mp3''wav’)`false
labelAdd a custom label to the recordingstring()false
media_nameName of the recording filestring()false
methodHTTP method if using an HTTP destination`string(‘put''post’)`false
originTrack how the recording was startedstring()false
record_min_secMinimum number of seconds recorded to consider it a valid recordinginteger()false
record_on_answerWhether to start recording when the leg is answeredboolean()falsefalse
record_on_bridgeWhether to start recording when the leg is bridgedboolean()falsefalse
record_sample_rateSampling rate for the recordinginteger()false
time_limitHow long to allow the recording, in secondsinteger()false
urlHTTP URL to send the finished recordingstring()false

Configure and use record_call actions via Metaflows

Let us say we have call recording enabled (or can be enabled on-demand) and we want to be able to pause recording when collecting sensitive data like credit card numbers and then be able to resume the recording once finished collecting sensitive data. For that purpose mask and unmask actions can be configured and used via Metaflows API.

Scenario: Alice calls Bob and Bob has Metaflows configured for start, mask, unmask, and stop record_call module’s actions. The following configuration is being used for configuring Bob’s Metaflows:

$ cat metaflows.json
{"data": {
    "binding_digit": "*",
    "numbers": {
        "71": {
            "module": "record_call",
            "data": {
                "action": "start"
            }
        },
        "72": {
            "module":"record_call",
            "data": {
                "action":"mask"
            }
        },
        "73": {
            "module":"record_call",
            "data": {
                "action":"unmask"
            }
        },
        "74": {
            "module":"record_call",
            "data": {
                "action":"stop"
            }
        }
    }
}}
curl -vX POST \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    -d "@/path/to/metaflows.json" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/users/{BOBs_USER_ID}/metaflows

After running that command Bob will have the following DTMF codes available:

*71 -> Start recording

*72 -> Mask/pause recording

*73 -> Unmask/resume recording

*74 -> Stop recording

So Alice calls Bob and at some point of the conversation Bob asks Alice for sensitive data so Bob presses *72 (assuming the call is being already recorded) to run mask action to avoid that portion of the call to be included on the final recording, once sensitive data collection is finished Bob presses *73 to run unmask action to resume the recording and everything after unmask action is going to be included on the final recording.

On this page