startRecording@v2

Start call recording. Replaces startRecording@v1 (the result is the lowercase recording SID).

VersionstartRecording@v2
Runs ininbound-call and your own branches

Parameters

NameTypeRequiredDefaultDescription
feedsall, leg_a, leg_b"all"accepts ${{ }}
transcriptionobject
transcription.languageaf-ZA, am-ET, ar-AE… (140 values)Language for Speech Recognition and Text-to-Speech. See Voices & Audio
accepts ${{ }}
transcription.enabledbooleantrueaccepts ${{ }}
transcription.sentimentbooleantrueaccepts ${{ }}
transcription.nerbooleantrueaccepts ${{ }}
transcription.piibooleantrueaccepts ${{ }}

Every parameter that accepts ${{ }} can be computed from an expression.

Examples

Short example

- action: startRecording@v2

You can specify which leg to record when a call is bridged

- action: startRecording@v2
  params:
    feeds: leg_a # leg_a|leg_b|all

Transcription is enabled by default

You can control the transcription parameters:

- action: startRecording@v2
  params:
    transcription:
      enabled: true
      sentiment: true # Sentiment Analysis per sentence
      ner: true # Named Entity Recognition
      pii: true # Personal Identifiable Information

You can access the transcription with the ready event

- action: startRecording@v2
  events:
    ready:
      # example, send an email with the transcription
      - action: email@v1
        params:
          fromName: My Company
          subject: Call transcript from ${{ call.fromNumber }}
          text: |
            Hello there!

            Here is the transcription from ${{ call.fromNumber }}. Duration: ${{ recording.duration }}s.

            He said: "${{ transcription_leg_a }}".
            We said: "${{ transcription_leg_b }}".

            The recording file is here: ${{ recording.url }}.
          to:
            - [email protected]
            - [email protected]

Actions in the 'ready' event have access to the following variables

- recording
- transcription_leg_a
- transcription_leg_b
- chat
- chat_text

Full example with defaults

- action: startRecording@v2
  params:
    feeds: all
    transcription:
      # language: en-US # default: the language of the scenario
      enabled: true
      sentiment: true
      ner: true
      pii: true
  result: $record # (string) Recording SID, lowercase
  # events:
  #   ready: # actions run when the recording is ready (1 or more)
# See: https://docs.callr.com/reference/recordingsget

Result

Set result: $myVariable to keep it. SID of the Recording (recording.sid), lowercase

Type: string

"0d0f9ef6"

Older versions

Older versions keep working in existing scenarios. Use the version above in new scenarios.

  • startRecording@v1: Start call recording

Did this page help you?