Record Call
About Record Call
Schema
Start a call recording
Key | Description | Type | Default | Required | Support Level |
---|---|---|---|---|---|
action | Whether to start/stop the recording | `string(‘mask' | 'unmask' | 'start' | 'stop' |
dtmf_leg | string() | false | |||
format | What format to store the recording | `string(‘mp3' | 'wav’)` | false | |
label | Add a custom label to the recording | string() | false | ||
media_name | Name of the recording file | string() | false | ||
method | HTTP method if using an HTTP destination | `string(‘put' | 'post’)` | false | |
origin | Track how the recording was started | string() | false | ||
record_min_sec | Minimum number of seconds recorded to consider it a valid recording | integer() | false | ||
record_on_answer | Whether to start recording when the leg is answered | boolean() | false | false | |
record_on_bridge | Whether to start recording when the leg is bridged | boolean() | false | false | |
record_sample_rate | Sampling rate for the recording | integer() | false | ||
time_limit | How long to allow the recording, in seconds | integer() | false | ||
url | HTTP URL to send the finished recording | string() | 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.